/* =========================================================================
   ESTILOS GENERALES (INSPIRACIÓN LUJO MINIMALISTA - SWAROVSKI)
   ========================================================================= */

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: #111111;
  letter-spacing: 0.5px;
}

/* Banner de Notificaciones Superior */
.announcement-bar {
  background-color: #111111;
  color: #ffffff;
  text-align: center;
  padding: 10px 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

header {
  background-color: #ffffff;
  color: #111111;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e2e2;
}

header .logo img {
  height: 45px;
}

nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

nav ul li {
  margin: 0 20px;
}

nav ul li a {
  color: #666666;
  text-decoration: none;
  font-weight: 400;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: color 0.3s ease;
}

nav ul li a:hover, 
nav ul li a.active {
  color: #111111;
  font-weight: 500;
}

/* =========================================================================
   🌟 NUEVO MEGA MENÚ ESTRUCTURAL (LUJO MINIMALISTA)
   ========================================================================= */
.category-nav {
  display: flex;
  justify-content: center;
  gap: 0px; /* Manejado internamente por los contenedores del menú */
  padding: 0;
  background: #fdfdfd;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
  z-index: 999;
}

/* Contenedor de cada item del menú principal */
.mega-menu-item {
  position: relative;
}

/* Enlace principal que dispara el menú */
.mega-menu-item .menu-trigger {
  display: block;
  color: #111111;
  text-decoration: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 400;
  padding: 20px 25px;
  transition: opacity 0.2s, background-color 0.2s;
}

.mega-menu-item:hover .menu-trigger {
  opacity: 0.6;
  background-color: #f7f7f7;
}

.mega-menu-item .sale-link {
  color: #b12704 !important;
  font-weight: 600;
}

/* Panel Desplegable Oculto */
.mega-menu-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffffff;
  min-width: 450px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e5e5;
  padding: 25px 30px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease-in-out;
  z-index: 1000;
}

/* Al pasar el mouse encima, se visualiza suavemente */
.mega-menu-item:hover .mega-menu-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Estructura interna de columnas */
.mega-menu-columns {
  display: flex;
  gap: 40px;
}

.mega-menu-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 160px;
}

/* Títulos de categorías internas */
.mega-menu-column h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #767676;
  margin: 0 0 12px 0;
  padding-bottom: 5px;
  border-bottom: 1px solid #eeeeee;
  font-weight: 600;
}

/* Enlaces de las subcategorías */
.mega-menu-column a {
  color: #333333;
  text-decoration: none;
  font-size: 0.8rem;
  padding: 6px 0;
  text-transform: capitalize;
  letter-spacing: 0.5px;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mega-menu-column a:hover {
  color: #111111;
  padding-left: 4px;
  font-weight: 500;
}

/* =========================================================================
   CONTENEDORES DE SECCIÓN Y PRODUCTOS
   ========================================================================= */

.store-section {
  padding: 40px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 300;
  margin-bottom: 30px;
  color: #111111;
  position: relative;
}

main {
  padding: 0;
}

.products {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 30px;
}

/* Tarjeta de Producto Premium */
.product {
  background: #ffffff;
  padding: 15px;
  border: 1px solid #eeeeee;
  border-radius: 0px;
  width: 290px;
  text-align: center;
  box-shadow: none;
  position: relative;
  transition: border-color 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product:hover {
  transform: none;
  border-color: #111111;
  box-shadow: none;
}

.product-image-container {
  width: 100%;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  overflow: hidden;
}

.product img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0px !important;
  object-fit: contain;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 10px 0 5px 0;
  color: #111111;
}

/* Estilo sutil para mostrar los materiales asignados */
.product-composition {
  font-size: 0.75rem;
  color: #767676;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.product-price {
  font-size: 1rem;
  color: #111111;
  font-weight: 500;
  margin-bottom: 15px;
}

/* Botones estilo Swarovski */
.product-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

button.product-details, a.product-details {
  background-color: transparent;
  border: 1px solid #111111;
  color: #111111;
  padding: 10px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  border-radius: 0px;
  width: 100%;
  margin: 0;
  transition: background-color 0.3s, color 0.3s;
}

button.product-details:hover, a.product-details:hover {
  background-color: #111111;
  color: #ffffff;
  transform: none;
}

.add-to-cart {
  background-color: #111111;
  color: #ffffff;
  border: 1px solid #111111;
  padding: 12px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 0px;
  width: 100%;
  margin: 0;
  transition: opacity 0.2s;
}

.add-to-cart:hover {
  background-color: #222222;
  opacity: 0.9;
}

/* Icono del Carrito del Header */
.cart-icon-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-icon {
  width: 28px; 
  height: auto;
  cursor: pointer;
  display: block;
}

.cart-icon-notification {
  position: absolute !important;
  top: -5px !important;
  right: -8px !important;
  background-color: #111111 !important;
  color: #ffffff !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px !important;
  font-weight: 600 !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  display: flex;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  z-index: 10;
  pointer-events: none;
}

/* Etiqueta de SALE Estilo Lujo Minimalista */
.luxury-sale-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: #b12704;
  color: white;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 1px;
  z-index: 10;
}

.product.offer .original-price {
  text-decoration: line-through;
  color: #767676;
  font-size: 0.9rem;
  margin-right: 8px;
}

.product.offer .discounted-price {
  color: #b12704;
  font-weight: 600;
}

/* Remover efectos antiguos pesados */
.product.offer::before {
  display: none !important;
}

.product.offer:hover img {
  filter: none !important;
}

/* Swiper ajustes de lujo */
.swiper {
  width: 100%;
  height: 280px;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.swiper-button-next,
.swiper-button-prev {
  color: #111111 !important;
  background-color: rgba(255, 255, 255, 0.8) !important;
  width: 35px !important;
  height: 35px !important;
  border-radius: 0px !important;
  padding: 0;
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 14px !important;
  font-weight: bold;
}

/* =========================================================================
   ESTILOS DE CONTROL DE STOCK DINÁMICO
   ========================================================================= */

.product.agotado {
  filter: grayscale(100%);
  opacity: 0.6;
}

.product.agotado .add-to-cart {
  display: none !important;
}

.badge-stock {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 1px;
  z-index: 10;
  color: #ffffff;
  text-transform: uppercase;
}

.badge-agotado {
  background-color: #555555;
}

/* Si el producto tiene SALE y está AGOTADO, desplazamos la etiqueta para que no se pisen */
.product.offer.agotado .badge-stock {
  top: 45px;
}

.badge-ultima-unidad {
  background-color: #d4af37;
  color: #111111;
}

.text-agotado {
  color: #555555;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px;
  border: 1px solid #eeeeee;
  background-color: #f9f9f9;
  width: 100%;
  box-sizing: border-box;
  display: inline-block;
}

/* =========================================================================
   🎟️ MÓDULO DE CUPONES Y DESCUENTOS EN CHECKOUT (NUEVO)
   ========================================================================= */

.coupon-container {
  margin: 20px 0;
  padding: 15px 0;
  border-top: 1px solid #eeeeee;
  border-bottom: 1px solid #eeeeee;
}

.coupon-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #767676;
  margin-bottom: 10px;
  font-weight: 600;
}

.coupon-form-group {
  display: flex;
  gap: 10px;
}

.coupon-input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #e2e2e2;
  border-radius: 0px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #111111;
  background-color: #ffffff;
  transition: border-color 0.2s;
}

.coupon-input:focus {
  outline: none;
  border-color: #111111;
}

.btn-apply-coupon {
  background-color: transparent;
  color: #111111;
  border: 1px solid #111111;
  padding: 10px 20px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.btn-apply-coupon:hover {
  background-color: #111111;
  color: #ffffff;
}

/* Feedback de cupones aplicado o error */
.coupon-message {
  font-size: 0.75rem;
  margin-top: 8px;
  letter-spacing: 0.5px;
  font-weight: 500;
  display: none; /* Se activa mediante JS */
}

.coupon-message.success {
  display: block;
  color: #2e7d32; /* Verde sofisticado */
}

.coupon-message.error {
  display: block;
  color: #b12704; /* Rojo coherente con el SALE */
}

/* Desglose de totales en el Carrito/Checkout */
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9rem;
  color: #333333;
}

.summary-row.discount-applied {
  color: #b12704;
  font-weight: 500;
}

.summary-row.total-final {
  border-top: 1px solid #111111;
  padding-top: 15px;
  margin-top: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #111111;
  text-transform: uppercase;
  letter-spacing: 1px;
}


/* =========================================================================
   RESPONSIVO / DISEÑO ADAPTADO
   ========================================================================= */
@media (max-width: 768px) {
  header {
    padding: 15px 20px;
    flex-direction: column;
    gap: 15px;
  }
  
  .category-nav {
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px;
  }

  .mega-menu-item .menu-trigger {
    padding: 10px 12px;
    font-size: 0.75rem;
  }

  /* Evita desborde horizontal del dropdown en móviles */
  .mega-menu-dropdown {
    position: fixed;
    top: auto;
    left: 5%;
    width: 90%;
    min-width: 0;
    transform: none;
    box-sizing: border-box;
    padding: 15px;
  }

  .mega-menu-item:hover .mega-menu-dropdown {
    transform: none;
  }

  .mega-menu-columns {
    flex-direction: column;
    gap: 15px;
  }

  .products {
    justify-content: center;
  }

  .coupon-form-group {
    flex-direction: column;
  }

  .btn-apply-coupon {
    width: 100%;
  }

 /* Asegura que el contenedor de Swiper de la tarjeta no rompa la estructura */
.product-image-container.swiper {
    position: relative;
    width: 100%;
    height: 300px; /* La altura que usen tus tarjetas */
    overflow: hidden;
}

.product-image-container .swiper-slide {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

/* Color negro elegante para los puntitos del slider */
.product-image-container .swiper-pagination-bullet-active {
    background: #000000 !important;
}

}