/*
 * Sabor Damasco - Header Styles
 * Header completo com navegação
 */

/* Header Container */
.header {
  background: var(--cor-contraste);
  box-shadow: var(--sombra-suave);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(27, 67, 50, 0.1);
}

/* Header Top - Informações de contato */
.header-top {
  background: var(--cor-primaria);
  color: var(--cor-contraste);
  padding: 0.6rem 0;
  font-size: 0.9rem;
  position: relative;
}

.header-top::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradiente-botao);
}

.header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact-info {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-1px);
}

.contact-item i {
  color: var(--cor-secundaria);
  font-size: 1rem;
  width: 16px;
  text-align: center;
}

.contact-item a {
  color: var(--cor-contraste);
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

.contact-item a:hover {
  color: var(--cor-secundaria);
}

/* Classes que estavam como 'phone' e 'hours' */
.phone, .hours {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.3s ease;
}

.phone:hover, .hours:hover {
  transform: translateY(-1px);
}

.phone i, .hours i {
  color: var(--cor-secundaria);
  font-size: 1rem;
  width: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.phone a, .hours-text {
  color: var(--cor-contraste);
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

.phone a:hover {
  color: var(--cor-secundaria);
}

.hours-text {
  color: var(--cor-contraste);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Redes Sociais */
.social-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--cor-contraste);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.social-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.social-links a:hover::before {
  left: 100%;
}

.social-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.social-links a[href*="instagram"]:hover {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-links a[href*="facebook"]:hover {
  background: #1877f2;
}

.social-links a[href*="whatsapp"]:hover {
  background: #25d366;
}

.social-links a i {
  font-size: 1rem;
  z-index: 1;
  position: relative;
}

/* Links de autenticação */
.auth-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.auth-link, .login-link, .register-link {
  color: var(--cor-contraste);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  position: relative;
}

.auth-link:hover, .login-link:hover, .register-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.auth-link.register, .register-link {
  background: var(--cor-secundaria);
  color: var(--cor-primaria);
  font-weight: 600;
}

.auth-link.register:hover, .register-link:hover {
  background: var(--dourado-imperial);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Header Main */
.header-main {
  padding: 1rem 0;
  background: var(--cor-contraste);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-brand a {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.navbar-brand a:hover {
  transform: scale(1.02);
}

.logo {
  max-height: 50px;
  width: auto;
  transition: all 0.3s ease;
}

.logo:hover {
  filter: brightness(1.1);
}

/* Esconder texto da marca - mostrar apenas logo */
.brand-text {
  display: none;
}

.navbar-nav {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: var(--cor-texto);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradiente-botao);
  transition: width 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cor-primaria);
  transform: translateY(-1px);
}

.nav-link i {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Carrinho */
.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--cor-secundaria);
  color: var(--cor-primaria);
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.cart-link::before {
  content: '🛒';
  font-size: 1.1rem;
}

.cart-link:hover {
  background: var(--dourado-imperial);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--cor-destaque);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(160, 82, 45, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(160, 82, 45, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(160, 82, 45, 0);
  }
}

/* Menu do usuário */
.user-menu {
  position: relative;
}

.user-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--cor-texto);
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  font-weight: 500;
}

.user-toggle:hover {
  background: rgba(27, 67, 50, 0.1);
  color: var(--cor-primaria);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradiente-botao);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cor-primaria);
  font-weight: 700;
  font-size: 0.9rem;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--cor-contraste);
  border-radius: var(--border-radius);
  box-shadow: var(--sombra-media);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.user-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--cor-contraste);
}

.user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--cor-texto);
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.user-dropdown a:last-child {
  border-bottom: none;
}

.user-dropdown a:first-child {
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.user-dropdown a:hover {
  background: rgba(27, 67, 50, 0.05);
  color: var(--cor-primaria);
  padding-left: 1.5rem;
}

.user-dropdown a i {
  margin-right: 0.5rem;
  opacity: 0.7;
}

.user-dropdown a.logout {
  color: var(--cor-destaque);
}

.user-dropdown a.logout:hover {
  background: rgba(160, 82, 45, 0.1);
}

/* Toggle mobile */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  background: rgba(27, 67, 50, 0.1);
}

.hamburger-line {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--cor-primaria);
  margin: 5px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Status do restaurante */
.restaurant-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
  border-radius: var(--border-radius);
  font-size: 0.8rem;
  font-weight: 500;
}

.restaurant-status.closed {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.3; }
}

/* Responsividade */
@media (max-width: 1024px) {
  .contact-info {
    gap: 1.5rem;
  }
  
  .nav-menu {
    gap: 1.5rem;
  }
  
  .nav-link {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .header-top {
    padding: 0.4rem 0;
  }
  
  .header-info {
    flex-direction: row;
    gap: 0.5rem;
    justify-content: space-between;
  }
  
  .contact-info {
    gap: 1rem;
    justify-content: flex-start;
  }
  
  /* Esconder horário de funcionamento no mobile */
  .hours {
    display: none;
  }
  
  .social-links {
    gap: 0.5rem;
    justify-content: flex-end;
  }
  
  .auth-links {
    gap: 0.5rem;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .navbar-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: var(--sombra-media);
    display: none;
    flex-direction: column;
    padding: 1rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
  }
  
  .navbar-nav.active {
    display: flex;
  }
  
  .nav-menu {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }
  
  .nav-link {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
  
  .nav-link:last-child {
    border-bottom: none;
  }
  
  .cart-link {
    margin-top: 1rem;
    justify-content: center;
  }
  
  .user-menu {
    margin-top: 1rem;
  }
  
  .user-toggle {
    justify-content: center;
    width: 100%;
  }
  
  .logo {
    max-height: 40px;
  }
}

@media (max-width: 480px) {
  .header-top {
    padding: 0.3rem 0;
  }
  
  .contact-info {
    flex-direction: row;
    gap: 0.5rem;
  }
  
  .social-links {
    justify-content: flex-end;
  }
  
  .logo {
    max-height: 35px;
  }
  
  .navbar {
    padding: 0.5rem 0;
  }
}

/* Animações */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar-nav.active {
  animation: slideDown 0.3s ease-out;
}

/* Acessibilidade */
.nav-link:focus,
.user-toggle:focus,
.mobile-menu-toggle:focus {
  outline: 2px solid var(--cor-secundaria);
  outline-offset: 2px;
}

@media print {
  .header {
    position: static;
    box-shadow: none;
  }
  
  .header-top,
  .mobile-menu-toggle,
  .user-menu {
    display: none;
  }
  
  .logo {
    max-height: 60px;
  }
}
