/* ============================================
   HEADER STYLES - Terapias Elnath
   ============================================ */

/* Importar fuente */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&display=swap');

/* Header Principal */
.header-custom {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1030;
}

/* Top Bar (Logo, Search, User & Cart) */
.top-bar {
  padding: 1rem 0;
}

/* Logo */
.header-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.navbar-brand:hover .header-logo {
  transform: rotate(360deg) scale(1.1);
}

/* Brand Text */
.brand-text {
  font-family: 'Dancing Script', cursive;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
}

.navbar-brand {
  text-decoration: none;
}

/* Search Form */
.search-form {
  width: 100%;
}

.search-input {
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 25px 0 0 25px;
  font-size: 0.95rem;
  outline: none;
}

.search-input:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.btn-search {
  background: #FFD700;
  color: #764ba2;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 0 25px 25px 0;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.btn-search:hover {
  background: #FFC700;
  color: #764ba2;
  transform: scale(1.05);
}

/* User & Cart Buttons */
.btn-user {
  background: rgba(255, 215, 0, 0.9);
  color: #764ba2 !important;
  border: 2px solid #FFD700;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-shadow: none;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.btn-user:hover {
  background: #FFD700;
  border-color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.6);
}

.btn-user i {
  font-size: 1.3rem;
  margin-right: 0.3rem;
  color: #764ba2;
}

.btn-outline-light {
  color: white !important;
  border-color: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: white;
  color: white !important;
  transform: translateY(-2px);
}

.btn-light {
  background: white;
  color: #764ba2 !important;
  border: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-light:hover {
  background: #FFD700;
  color: #764ba2 !important;
  transform: translateY(-2px);
}

/* Cart Button */
.btn-cart {
  background: rgba(255, 255, 255, 0.2);
  color: white !important;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.5rem 1rem;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  text-decoration: none;
}

.btn-cart:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: white;
  transform: translateY(-2px);
}

.btn-cart i {
  font-size: 1.3rem;
}

/* Cart Badge */
.cart-badge-new {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4757;
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 0.2rem 0.45rem;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Dropdown Menu */
.dropdown-menu {
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  margin-top: 0.5rem;
  z-index: 9999 !important;
  position: absolute !important;
  display: none;
}

.dropdown-menu.show {
  display: block !important;
}

.dropdown-item {
  padding: 0.6rem 1.2rem;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.dropdown-item i {
  margin-right: 0.5rem;
  width: 20px;
}

/* Asegurar que el dropdown esté por encima de todo */
.header-custom .dropdown {
  position: relative;
  z-index: 1000;
}

/* Banner de envíos */
.shipping-banner-container {
  background: rgba(0, 0, 0, 0.2);
  padding: 0.5rem 0;
  overflow: hidden;
}

.shipping-banner {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.shipping-content {
  display: flex;
  align-items: center;
  white-space: nowrap;
  gap: 25px;
  animation: scrollShipping 20s linear infinite;
  padding-left: 100%;
}

.shipping-text {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: white;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  padding: 0 15px;
}

.shipping-banner i {
  font-size: 1.2rem;
  color: #FFD700;
  animation: bounceIcon 2s infinite;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

@keyframes scrollShipping {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@keyframes bounceIcon {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.shipping-banner:hover .shipping-content {
  animation-play-state: paused;
}

/* ============================================
   MAIN NAVIGATION MENU
   ============================================ */

.main-nav {
  background: linear-gradient(135deg, #4a5d23 0%, #6b8e23 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 999;
}

.navbar-toggler {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.3);
}

.navbar-toggler i {
  margin-right: 0.5rem;
}

/* Navbar Collapse - mostrar siempre en desktop */
.navbar-collapse {
  display: flex !important;
  justify-content: center;
}

/* Navigation Menu */
.nav-menu {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  justify-content: center;
  width: 100%;
}

.nav-item {
  margin: 0;
}

.nav-link {
  color: white !important;
  font-size: 1.05rem;
  font-weight: 500;
  padding: 0.8rem 1.5rem !important;
  margin: 0 0.2rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  display: block;
  text-decoration: none;
}

.nav-link i {
  margin-right: 0.4rem;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: #FFD700;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 70%;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 991px) {
  .brand-text {
    font-size: 1.2rem;
  }

  .header-logo {
    width: 40px;
    height: 40px;
  }

  .shipping-banner-container {
    display: none !important;
  }

  /* En móvil, permitir que el collapse funcione normalmente */
  .navbar-collapse {
    display: block !important;
  }

  .navbar-collapse.collapse:not(.show) {
    display: none !important;
  }

  .navbar-collapse.collapse.show {
    display: block !important;
  }

  .nav-menu {
    flex-direction: column;
    padding: 1rem 0;
  }

  .nav-link {
    margin: 0.25rem 0;
    text-align: center;
  }

  .btn-user span,
  .btn-outline-light span,
  .btn-light span {
    display: none;
  }
}

@media (max-width: 576px) {
  .brand-text {
    font-size: 1rem;
  }

  .header-logo {
    width: 35px;
    height: 35px;
  }

  .search-input {
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
  }

  .btn-search {
    padding: 0.5rem 1rem;
    font-size: 1rem;
  }

  .btn-cart {
    width: 40px;
    height: 40px;
  }

  .btn-cart i {
    font-size: 1.1rem;
  }

  .nav-link {
    font-size: 0.95rem;
    padding: 0.6rem 1rem !important;
  }
}
