/* ==========================================================================
   HERO SECTION RESPONSIVE - Argentina Extrema
   Estilos específicos para la nueva versión responsive del hero
   ========================================================================== */

/* ==========================================================================
   VARIABLES ESPECÍFICAS PARA HERO
   ========================================================================== */
:root {
  --hero-mobile-search-height: 140px;
  --hero-min-height-mobile: 100vh;
  --hero-min-height-desktop: 80vh;
  --hero-overlay-dark: rgba(0, 0, 0, 0.4);
  --hero-overlay-gradient: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.5) 100%);
  --hero-text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   HERO SECTION NUEVA ESTRUCTURA
   ========================================================================== */
.hero-section-new {
  position: relative;
  overflow: hidden;
  background: var(--aex-gray-900);
}

/* ==========================================================================
   BÚSQUEDA MÓVIL REPOSICIONADA
   ========================================================================== */
.mobile-search-container {
  position: absolute;
  top: 80px; /* Después del navbar fijo */
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, transparent 100%);
  backdrop-filter: blur(2px);
}

.mobile-search-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin: 0 1rem;
  animation: slideInFromTop 0.6s ease-out;
}

@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-search-form .search-input-wrapper {
  margin-bottom: 0;
}

.mobile-search-form .input-group {
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.mobile-search-form .input-group:focus-within {
  border-color: var(--aex-primary);
  box-shadow: 0 4px 20px rgba(253, 126, 20, 0.3);
  transform: translateY(-2px);
}

.search-input-mobile {
  border: none;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  background: white;
  color: var(--aex-gray-900);
  font-weight: 500;
}

.search-input-mobile:focus {
  box-shadow: none !important;
  border-color: transparent !important;
}

.search-btn-mobile {
  background: var(--aex-primary);
  border: none;
  padding: 1rem 1.5rem;
  color: white;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.search-btn-mobile:hover {
  background: var(--aex-primary-dark);
  transform: scale(1.05);
}

/* Quick Filter Chips */
.quick-filters {
  margin-top: 1rem;
}

.filter-chip-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-chip {
  border: 2px solid rgba(253, 126, 20, 0.3) !important;
  color: var(--aex-primary) !important;
  background: rgba(253, 126, 20, 0.1) !important;
  border-radius: 2rem !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
  backdrop-filter: blur(10px);
  min-width: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.filter-chip:hover {
  background: rgba(253, 126, 20, 0.2) !important;
  border-color: var(--aex-primary) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(253, 126, 20, 0.3);
}

.btn-check:checked + .filter-chip {
  background: var(--aex-primary) !important;
  color: white !important;
  border-color: var(--aex-primary) !important;
  box-shadow: 0 4px 15px rgba(253, 126, 20, 0.4);
}

/* Resultados de búsqueda móvil */
.mobile-search-results {
  margin-top: 1rem;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-search-list {
  padding: 0;
}

.mobile-search-item {
  display: flex;
  padding: 1rem;
  border-bottom: 1px solid #f8f9fa;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s ease;
  align-items: flex-start;
}

.mobile-search-item:hover {
  background-color: rgba(253, 126, 20, 0.05);
  text-decoration: none;
}

.search-item-image {
  width: 60px;
  height: 60px;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-right: 1rem;
  flex-shrink: 0;
}

.search-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-item-content {
  flex: 1;
  min-width: 0;
}

.search-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--aex-gray-900);
  line-height: 1.3;
}

.search-item-description {
  font-size: 0.8rem;
  color: var(--aex-gray-600);
  margin-bottom: 0.25rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-item-price {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--aex-primary);
}

/* ==========================================================================
   CAROUSEL HERO RESPONSIVE
   ========================================================================== */
.hero-carousel-new {
  height: 100vh;
  position: relative;
}

.hero-carousel-new .carousel-item {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}

.hero-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--hero-overlay-gradient);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  color: white;
  text-shadow: var(--hero-text-shadow);
}

/* ==========================================================================
   CONTENIDO DEL HERO
   ========================================================================== */
.hero-text {
  padding: 2rem 0;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  line-height: 1.5;
  margin-bottom: 2rem;
  max-width: 600px;
  font-weight: 400;
  opacity: 0.95;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-actions .btn {
  border-radius: 0.75rem;
  padding: 0.875rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-width: 2px;
  min-width: 180px;
  text-align: center;
}

.hero-actions .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.hero-actions .btn-primary {
  background: linear-gradient(135deg, var(--aex-primary), var(--aex-primary-dark));
  border-color: var(--aex-primary);
  box-shadow: 0 4px 15px rgba(253, 126, 20, 0.4);
}

.hero-actions .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.8);
  color: white;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.hero-actions .btn-outline-light:hover {
  background: white;
  color: var(--aex-gray-900);
  border-color: white;
}

/* ==========================================================================
   PRODUCTOS PROMOCIONALES
   ========================================================================== */
.promo-products {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px);
  border-radius: 1.5rem;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: fadeInRight 1s ease-out 0.6s both;
}

.promo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.promo-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin: 0;
}

.promo-badge {
  background: linear-gradient(135deg, var(--aex-primary), var(--aex-primary-dark));
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(253, 126, 20, 0.4);
}

.promo-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.promo-product-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.promo-product-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.promo-product-image {
  width: 60px;
  height: 45px;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-right: 1rem;
  flex-shrink: 0;
}

.promo-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-product-content {
  flex: 1;
  min-width: 0;
}

.promo-product-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.25rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.promo-product-price {
  font-size: 0.85rem;
  color: var(--aex-primary-light);
  font-weight: 600;
}

.promo-product-date {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.25rem;
}

/* ==========================================================================
   SCROLL INDICATOR
   ========================================================================== */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;
}

.scroll-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2rem;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  animation: bounce 2s infinite;
  font-size: 1.5rem;
  min-width: 80px;
}

.scroll-btn:hover {
  background: rgba(253, 126, 20, 0.8);
  color: white;
  transform: translateY(-0.25rem);
  text-decoration: none;
}

.scroll-text {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   INDICADORES Y CONTROLES DEL CAROUSEL
   ========================================================================== */
.hero-carousel-new .carousel-indicators {
  bottom: 1rem;
  margin-bottom: 0;
}

.hero-carousel-new .carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  margin: 0 0.5rem;
  transition: all 0.3s ease;
}

.hero-carousel-new .carousel-indicators button.active {
  background: var(--aex-primary);
  border-color: var(--aex-primary);
  box-shadow: 0 0 10px rgba(253, 126, 20, 0.5);
}

.hero-carousel-new .carousel-control-prev,
.hero-carousel-new .carousel-control-next {
  width: 60px;
  height: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.hero-carousel-new .carousel-control-prev {
  left: 2rem;
}

.hero-carousel-new .carousel-control-next {
  right: 2rem;
}

.hero-carousel-new .carousel-control-prev:hover,
.hero-carousel-new .carousel-control-next:hover {
  background: rgba(253, 126, 20, 0.8);
  transform: translateY(-50%) scale(1.1);
}

/* ==========================================================================
   ANIMACIONES
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

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

/* Tablet Landscape - 1024px y menos */
@media (max-width: 1024px) {
  .promo-products {
    padding: 1.5rem;
  }
  
  .promo-title {
    font-size: 1.3rem;
  }
  
  .hero-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
  }
  
  .hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
  }
}

/* Tablet Portrait - 768px y menos */
@media (max-width: 768px) {
  .mobile-search-container {
    top: 70px; /* Altura navbar móvil */
    padding: 0.75rem 0;
  }
  
  .mobile-search-card {
    margin: 0 0.75rem;
    padding: 1.25rem;
  }
  
  .hero-carousel-new .carousel-item {
    height: 100vh;
  }
  
  .hero-content {
    padding-top: var(--hero-mobile-search-height);
  }
  
  .hero-text {
    padding: 1rem 0;
    text-align: left;
  }
  
  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    margin-bottom: 1.5rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .hero-actions .btn {
    padding: 1rem;
    font-size: 0.95rem;
    min-width: auto;
  }
  
  /* Ocultar productos promocionales en móvil */
  .promo-products {
    display: none;
  }
  
  /* Controles del carousel - ocultar en móvil */
  .hero-carousel-new .carousel-control-prev,
  .hero-carousel-new .carousel-control-next {
    display: none;
  }
  
  .scroll-indicator {
    bottom: 1rem;
  }
  
  .scroll-btn {
    padding: 0.75rem;
    font-size: 1.25rem;
    min-width: 70px;
  }
  
  .scroll-text {
    font-size: 0.75rem;
  }
}



/* ==========================================================================
   DARK MODE SUPPORT
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  .mobile-search-card {
    background: rgba(33, 37, 41, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .search-input-mobile {
    background: #2d3238;
    color: #e9ecef;
    border-color: #495057;
  }
  
  .filter-chip {
    background: rgba(253, 126, 20, 0.15) !important;
    border-color: rgba(253, 126, 20, 0.4) !important;
  }
  
  .mobile-search-results {
    background: #2d3238;
    border-color: #495057;
  }
  
  .mobile-search-item {
    border-color: #495057;
  }
  
  .search-item-title {
    color: #e9ecef;
  }
  
  .search-item-description {
    color: #adb5bd;
  }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .hero-title,
  .hero-subtitle,
  .hero-actions,
  .promo-products,
  .mobile-search-card,
  .scroll-btn {
    animation: none !important;
  }
  
  .promo-product-card,
  .hero-actions .btn,
  .search-btn-mobile,
  .filter-chip {
    transition: none !important;
  }
  
  .scroll-btn {
    animation: none !important;
  }
  
  .hero-bg {
    transform: none !important;
  }
}

/* ==========================================================================
   HIGH CONTRAST MODE
   ========================================================================== */
@media (prefers-contrast: high) {
  .mobile-search-card {
    border-width: 3px;
    background: white;
  }
  
  .filter-chip {
    border-width: 3px !important;
  }
  
  .hero-title,
  .hero-subtitle {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 1);
  }
  
  .btn-outline-light {
    border-width: 3px;
  }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
@media print {
  .mobile-search-container,
  .scroll-indicator,
  .hero-carousel-new .carousel-control-prev,
  .hero-carousel-new .carousel-control-next,
  .hero-carousel-new .carousel-indicators {
    display: none !important;
  }
  
  .hero-carousel-new .carousel-item {
    height: auto !important;
  }
  
  .hero-bg::after {
    display: none;
  }
  
  .hero-content {
    color: black !important;
    text-shadow: none !important;
  }
}


/* Overlay del search sobre el hero - SOLO MÓVIL */
@media (max-width: 767.98px) {
    .hero-mobile-search-overlay {
        position: absolute;
        top: 80px; /* Debajo del navbar */
        left: 0;
        right: 0;
        z-index: 1000;
        padding: 1rem;
        pointer-events: none; /* Permite interactuar con el carousel debajo */
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, transparent 100%);
        backdrop-filter: blur(2px);
    }
    
    .hero-search-container {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        width: 100%;
        pointer-events: none;
    }
    
    .hero-search-card {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 1rem;
        padding: 1rem;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.2);
        width: 100%;
        max-width: 400px;
        pointer-events: auto; /* Permite interactuar con el search */
        margin: 0 auto;
        transition: all 0.3s ease;
        animation: slideInFromTop 0.6s ease-out;
    }
    
    @keyframes slideInFromTop {
        from {
            opacity: 0;
            transform: translateY(-30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Estilos para el formulario dentro del hero */
    .hero-search-card .search-form {
        margin-bottom: 0 !important;
        margin-top: 0 !important;
    }
    
    .hero-search-card .input-group {
        border-radius: 0.75rem;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border: 2px solid transparent;
        transition: all 0.3s ease;
    }
    
    .hero-search-card .input-group:focus-within {
        border-color: #fd7e14;
        box-shadow: 0 4px 20px rgba(253, 126, 20, 0.3);
        transform: translateY(-2px);
    }
    
    .hero-search-card .form-control {
        border: none;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        background: white;
        color: #212529;
        font-weight: 500;
    }
    
    .hero-search-card .form-control:focus {
        box-shadow: none !important;
        border-color: transparent !important;
    }
    
    .hero-search-card .form-select {
        border: none;
        border-left: 1px solid #e9ecef;
        background: white;
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
        color: #212529;
        max-width: 110px;
    }
    
    .hero-search-card .btn-warning {
        border: none;
        padding: 0.75rem 1rem;
        background: linear-gradient(135deg, #fd7e14 0%, #ff9500 100%);
        color: white;
        font-weight: 600;
        transition: all 0.3s ease;
        font-size: 1.1rem;
    }
    
    .hero-search-card .btn-warning:hover {
        background: linear-gradient(135deg, #e86d02 0%, #e8830a 100%);
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(253, 126, 20, 0.3);
    }
    
    /* Resultados de búsqueda en el hero */
    .hero-search-card .search-results {
        margin-top: 0.5rem !important;
        border-radius: 0.75rem;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        background: white;
        max-height: 60vh;
        overflow-y: auto;
        position: relative;
        z-index: 1001;
    }
    
    /* Estados de focus mejorados */
    .hero-search-card .form-control:focus,
    .hero-search-card .form-select:focus {
        outline: 2px solid rgba(253, 126, 20, 0.3);
        outline-offset: 2px;
    }
    
    /* Ajustes para pantallas muy pequeñas */
    @media (max-width: 480px) {
        .hero-mobile-search-overlay {
            padding: 0.75rem;
            top: 75px;
        }
        
        .hero-search-card {
            padding: 0.75rem;
            border-radius: 0.75rem;
        }
        
        .hero-search-card .form-control,
        .hero-search-card .form-select,
        .hero-search-card .btn-warning {
            padding: 0.6rem 0.8rem;
            font-size: 0.9rem;
        }
        
        .hero-search-card .form-select {
            max-width: 90px;
            padding: 0.6rem 0.4rem;
            font-size: 0.8rem;
        }
    }
    
    /* Asegurar que el hero tenga suficiente altura para el search */
    .hero-section-new,
    .hero-section {
        min-height: calc(100vh - 70px); /* Altura de navbar */
        position: relative;
    }
    
    /* Ajuste del carousel para dar espacio al search */
    .hero-carousel-new,
    .hero-carousel {
        height: calc(100vh - 70px);
        min-height: 500px;
    }
}

/* DESKTOP - Mantener todo como estaba */
@media (min-width: 768px) {
    .hero-mobile-search-overlay {
        display: none !important;
    }
    
    /* Asegurar que el search del navbar esté visible en desktop */
    #navbarMain .d-lg-none {
        display: none !important;
    }
}

/* Transiciones suaves para cambio de tamaño */
.hero-search-card,
.hero-mobile-search-overlay {
    transition: all 0.3s ease;
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .hero-search-card {
        animation: none;
    }
    
    .hero-search-card,
    .hero-mobile-search-overlay,
    .hero-search-card .btn-warning {
        transition: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .hero-search-card {
        background: rgba(33, 37, 41, 0.98);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .hero-search-card .form-control,
    .hero-search-card .form-select {
        background: #2d3238;
        color: #e9ecef;
        border-color: #495057;
    }
    
    .hero-search-card .search-results {
        background: #2d3238;
        border-color: #495057;
    }
}