/* =========================================
   1. VARIABLES Y CONFIGURACIÓN GENERAL
========================================= */
:root {
  --bg: #FAF7F6;
  --text: #1E1B1B;
  --muted: #6E6363;
  --line: #E9E2E1;
  --card: #FFFFFF;
  --accent: #C2185B;
  --gold: #B08D57;

  --radius: 18px;
  --shadow: 0 10px 30px rgba(0,0,0,.06);
  --max: 1180px;
}

* { 
  box-sizing: border-box; 
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { 
  color: inherit; 
  text-decoration: none; 
}

img { 
  max-width: 100%; 
  display: block; 
}

.container { 
  max-width: var(--max); 
  margin: 0 auto; 
  padding: 0 18px; 
}

/* =========================================
   2. HEADER Y NAVEGACIÓN
========================================= */
.topbar {
  background: #121010;
  color: #fff;
  font-size: 13px;
}

.topbar .container {
  display: flex; gap: 14px; justify-content: center; align-items: center;
  padding: 10px 18px;
  text-align: center;
  flex-wrap: wrap;
}

.dot { opacity: .65; }

header {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(250,247,246,.75);
  border-bottom: 1px solid var(--line);
  transition: transform 0.3s ease-in-out; /* Esto es para el efecto de ocultar el header al hacer scroll */
}
/* Esta clase es la que esconderá el menú */
header.nav-hidden {
  transform: translateY(-100%); 
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px 0;
  gap: 12px;
}

.nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  margin-bottom: 12px; /* Separa un poquito el logo del menú de abajo */
}

.logo {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  letter-spacing: .3px;
  font-size: 24px; /* Lo agrandé apenas 2px para que gane más presencia */
  line-height: 1; /* CLAVE: quita el espacio invisible para que la palabra de abajo pueda pegarse */
}

.logo-sub {
  font-family: "Playfair Display", serif;
  font-style: italic; /* Cursiva elegante */
  font-size: 14px;
  color: #f1aaed; /* Rosa */
  margin-top: -2px; /* MAGIA: Esto es lo que lo empuja hacia arriba y lo deja bien pegado */
  font-weight: 500;
  letter-spacing: 0.5px;
}

.menu {
  display: flex; gap: 18px;
  font-size: 14px;
  color: var(--muted);
  justify-content: center;
  flex-wrap: wrap;
}

.menu a {
  padding: 10px 10px;
  border-radius: 999px;
}

.menu a:hover {
  background: rgba(194,24,91,.08);
  color: var(--text);
}

.actions {
  display: flex; justify-content: flex-end; gap: 10px; align-items: center;
}

/* ESTILO AGREGADO PARA TU BUSCADOR */
.search-container input {
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  outline: none;
  font-size: 13px;
  width: 160px;
  background: rgba(255,255,255,.7);
}

.iconbtn {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50px;
  height: 40px;
  width: auto; /* Permite que el texto del carrito entre bien */
  padding: 0 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.iconbtn i {
  font-size: 20px; /* Tamaño del icono */
}
/* Espacio y centrado para todos los iconos pequeños */
.pill-location i, .heroBadge i, .foot a i, .copy i {
  font-size: 16px;
  vertical-align: text-bottom; /* Alinea el icono perfecto con el texto */
}
/* CAMBIADO DE .pill A .pill-location PARA QUE COINCIDA CON TU HTML */
.pill-location {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.7);
  font-size: 14px;
  color: var(--muted);
  width: fit-content; /* Esto evita que se estire */
}

/* Centramos la X del carrito */
#close-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
}
/* =========================================
   3. HERO SECTION (Banner principal)
========================================= */
.hero {
  padding: 26px 0 10px;
}

.heroCard {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  border-radius: calc(var(--radius) + 10px);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: var(--card);
  min-height: 420px;
}

.heroImg {
  position: relative;
  background:
    linear-gradient(90deg, rgba(0,0,0,.35), rgba(0,0,0,.05)),
    url("https://images.unsplash.com/photo-1520975958221-8f61d6c7a901?auto=format&fit=crop&w=1400&q=80");
  background-size: cover;
  background-position: center;
  padding: 26px;
  display: flex;
  align-items: flex-end;
}

.heroBadge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.45);
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: #2c2626;
}

.heroContent {
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.kicker {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
}

h1 {
  font-family: "Playfair Display", serif;
  font-size: 44px;
  margin: 0;
  line-height: 1.05;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 44ch;
}

.ctaRow {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 6px;
}

.btn {
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.btnPrimary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 12px 22px rgba(194,24,91,.25);
}

.btnPrimary:hover { filter: brightness(.98); }
.btnGhost:hover { background: rgba(194,24,91,.08); }

/* =========================================
   4. SECCIONES GENERALES
========================================= */
.section { padding: 26px 0; }

.sectionHeader {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}

.sectionHeader h2 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 28px;
}

.sectionHeader p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.link {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

/* Categorías */
/* =========================================
   CATEGORÍAS (GRILLA Y TARJETAS)
========================================= */
.cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Esto asegura que sean 4 columnas en PC */
  gap: 14px;
}

.cat {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--card);
  box-shadow: 0 10px 22px rgba(0,0,0,.05);
  position: relative;
  
  /* Altura reducida para que sean más apaisadas */
  height: 120px; 
  
  /* Centrado de imagen */
  background-size: cover;
  background-position: center;
  
  display: flex;
  align-items: flex-end;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cat:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 25px rgba(0,0,0,.08);
}

.cat::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.6), rgba(0,0,0,.1)); 
}

.cat .label {
  position: relative;
  padding: 12px 14px;
  color: #fff;
  display: flex; flex-direction: column; gap: 4px;
  width: 100%;
}

.cat .label strong { font-size: 16px; }
.cat .label span { font-size: 13px; opacity: .92; }
/* =========================================
   5. TARJETAS DE PRODUCTOS (GRILLA)
========================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0,0,0,.05);
  display: flex;
  flex-direction: column;
  position: relative; /* ✅ Esto fija la etiqueta dentro de la tarjeta */
}


.thumb {
  aspect-ratio: 4/5;
  background: linear-gradient(120deg, #efe8f0, #ffffff);
  position: relative;
}

.tag {
  position: absolute; 
  top: 12px; 
  left: 12px;
  z-index: 10; /* ✅ Esto asegura que se vea por encima de la foto */
  background: rgba(235, 225, 233, 0.95);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #2b2323;
  text-transform: uppercase;
}

.info {
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}

.titleRow {
  display: flex; justify-content: space-between; gap: 10px; align-items: flex-start;
}

.name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
}

.price {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.meta {
  display: flex; justify-content: space-between; align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.swatches { display: flex; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 999px; border: 1px solid rgba(0,0,0,.12); }

.quick {
  display: flex; gap: 10px; align-items: center;
}

.add {
  width: 100%;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.add:hover { 
  background: rgba(194,24,91,.08); 
  border-color: rgba(194,24,91,.25); 
}

/* =========================================
   6. BANNERS, REVIEWS Y NEWSLETTER
========================================= */
.banner {
  border-radius: calc(var(--radius) + 10px);
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(194,24,91,.10), rgba(176,141,87,.10));
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.banner h3 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 24px;
}

.banner p {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 60ch;
}

.reviews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.review {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 10px 22px rgba(0,0,0,.05);
}

.stars { color: var(--gold); letter-spacing: 2px; }
.review p { margin: 10px 0 0; color: var(--muted); line-height: 1.6; }
.who { margin-top: 12px; font-weight: 600; font-size: 14px; }

.newsletter {
  border-radius: calc(var(--radius) + 10px);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.newsletter h3 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 24px;
}

.form {
  display: flex; gap: 10px; flex-wrap: wrap;
}

.input {
  min-width: 260px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  outline: none;
  font-size: 14px;
}

/* =========================================
   7. FOOTER
========================================= */
footer {
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.5);
  padding: 26px 0;
  margin-top: 18px;
}

.foot {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr; /* CORREGIDO A 3 COLUMNAS PARA TU HTML ACTUAL */
  gap: 18px;
}

.foot h4 { margin: 0 0 10px; font-size: 14px; }
.foot a { display: block; color: var(--muted); font-size: 14px; padding: 6px 0; }

.copy {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* Esto divide los links de la tienda en 2 columnas prolijas */
.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px; 
}

/* Ocultamos la columna de la tienda en celulares */
  .footer-tienda { 
    display: block; 
  }

/* =========================================
   8. CARRITO LATERAL (SIDEBAR)
========================================= */
.cart-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
  z-index: 40;
  opacity: 0; visibility: hidden;
  transition: all 0.3s ease;
}

.cart-overlay.active {
  opacity: 1; visibility: visible;
}

.cart-sidebar {
  position: fixed; top: 0; right: -400px;
  width: 100%; max-width: 380px; height: 100vh;
  background: var(--bg);
  z-index: 50;
  box-shadow: -10px 0 30px rgba(0,0,0,0.1);
  transition: right 0.3s ease;
  display: flex; flex-direction: column;
}

.cart-sidebar.active {
  right: 0;
}

.cart-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card);
}

.cart-header h3 {
  margin: 0; font-family: "Playfair Display", serif; font-size: 20px;
}

#close-cart {
  background: none; border: none; font-size: 20px; color: var(--muted); cursor: pointer;
}

.cart-items {
  flex: 1; overflow-y: auto; padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
}

.cart-footer {
  padding: 24px; border-top: 1px solid var(--line); background: var(--card);
}

.cart-total {
  font-weight: 600; font-size: 18px; margin-bottom: 16px;
  display: flex; justify-content: space-between; color: var(--text);
}

/* =========================================
   9. RESPONSIVE (MEDIA QUERIES)
========================================= */
@media (max-width: 980px) {
  .nav { display: flex; flex-wrap: wrap; justify-content: center; } /* ARREGLO PARA QUE EL NAVBAR NO COLAPSE EN TABLET */
  .nav-center { order: -1; width: 100%; margin-bottom: 15px; }
  .heroCard { grid-template-columns: 1fr; }
  h1 { font-size: 38px; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .reviews { grid-template-columns: 1fr; }
  .foot { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  h1 { font-size: 34px; }
  .menu { display: none; }
  .cats { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .input { min-width: 100%; }
  .foot { grid-template-columns: 1fr; }
}

/* =========================================
   10. MENÚ LATERAL MÓVIL Y RESPONSIVE
========================================= */
.menu-sidebar {
  position: fixed; top: 0; left: -400px; /* Oculto a la izquierda */
  width: 100%; max-width: 320px; height: 100vh;
  background: var(--bg);
  z-index: 50;
  box-shadow: 10px 0 30px rgba(0,0,0,0.1);
  transition: left 0.3s ease;
  display: flex; flex-direction: column;
}

.menu-sidebar.active { left: 0; } /* Entra a la pantalla */

.mobile-nav-links {
  display: flex; flex-direction: column; padding: 24px; gap: 10px; overflow-y: auto;
}

.mobile-nav-links a {
  font-size: 16px; font-weight: 500; color: var(--text); 
  border-bottom: 1px solid var(--line); padding: 14px 0;
  display: flex; justify-content: space-between; align-items: center;
}

/* Agrega una flechita sutil al final de cada link */
.mobile-nav-links a::after {
  content: "›"; font-size: 20px; color: var(--muted);
}

/* Modificamos cómo se ve el Header en pantallas chicas */
@media (max-width: 980px) {
  /* Forzamos que queden en 1 sola fila: Menú - Logo - Carrito */
  .nav { display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center; }
  .nav-center { order: 0; width: auto; margin-bottom: 0; }
  .nav-left { flex: 1; display: flex; justify-content: flex-start; }
  .nav-center { flex: 1; display: flex; justify-content: center; }
  .actions { flex: 1; display: flex; justify-content: flex-end; }
  
  /* Ocultamos elementos de PC */
  .pill-location { display: none !important; }
  .actions .search-container { display: none; }
  .menu { display: none; }
  
  /* Mostramos el botón hamburguesa */
  #menu-btn { display: flex !important; border: none; background: transparent; padding: 0;}
  #menu-btn i { font-size: 28px; color: var(--text); }
}

/* =========================================
   11. RESPONSIVE (CELULARES)
========================================= */
@media (max-width: 520px) {
  h1 { font-size: 34px; }
  .cats { grid-template-columns: 1fr; }
  /* GRILLA ESTILO ADIDAS (2 COLUMNAS EN CELULAR) */
  .grid { 
    grid-template-columns: 1fr 1fr; /* Fuerza las 2 columnas */
    gap: 10px; /* Achica un poco el espacio entre tarjetas */
  }

  /* Achicamos la tarjeta para que quede fina en 2 columnas */
  .card .thumb {
    height: 160px; /* Foto más compacta */
  }
  .card .info {
    padding: 10px;
  }
  .card .info .name {
    font-size: 13px; /* Texto más chico */
  }
  .card .info .price {
    font-size: 14px;
  }
  .card .add {
    padding: 8px;
    font-size: 12px;
  }
  .input { min-width: 100%; }
  
  /* --- AJUSTES DEL FOOTER COMPACTO --- */
  footer { padding: 18px 0; }
  .foot { grid-template-columns: 1fr; gap: 12px; }
  
  /* MAGIA: Aquí apagamos la tienda SOLO para celulares */
  .footer-tienda { display: none !important; }
  
  .foot h4 { margin-bottom: 2px; }
  .foot a { padding: 4px 0; }
  .copy {
    margin-top: 15px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
  }
}
/* =========================================
   13. VISTA DE DETALLE (MODAL) - CORREGIDO
========================================= */
.product-modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: flex; justify-content: center; align-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.product-modal-overlay.active {
  opacity: 1; pointer-events: auto;
}
.product-modal {
  background: var(--card);
  width: 90%; max-width: 850px;
  border-radius: var(--radius);
  position: relative;
  display: flex; overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.product-modal-overlay.active .product-modal {
  transform: translateY(0);
}
.close-modal {
  position: absolute; top: 15px; right: 15px;
  background: #fff; border: none; font-size: 20px;
  width: 36px; height: 36px; border-radius: 50%;
  cursor: pointer; display: flex; justify-content: center; align-items: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 10;
}
.modal-content { display: flex; width: 100%; }

/* --- CONTENEDOR DE IMAGEN CON ZOOM --- */
.modal-image-container {
  width: 50%; min-height: 450px;
  overflow: hidden; /* Clave para el zoom */
  cursor: zoom-in;
}
.modal-image {
  width: 100%; height: 100%;
  background-size: cover; 
  /* MAGIA: Ahora se centra igual que la grilla */
  background-position: center center !important; 
  transition: transform 0.4s ease; /* Para el zoom suave */
}
/* Efecto zoom en PC */
.modal-image-container:hover .modal-image {
  transform: scale(1.15); /* Se agranda un 15% */
}

.modal-info {
  width: 50%; padding: 40px; display: flex; flex-direction: column; justify-content: center;
}
.modal-info h3 { font-size: 26px; margin-bottom: 10px; font-family: "Playfair Display", serif; }
.modal-price { font-size: 20px; font-weight: 600; color: var(--text); margin-bottom: 15px; }
.modal-desc { color: var(--muted); font-size: 14px; line-height: 1.6; }

@media (max-width: 768px) {
  .modal-content { flex-direction: column; }
  .modal-image-container { width: 100%; height: 350px; min-height: 350px; cursor: default; }
  
  /* En celular forzamos el centrado también */
  .modal-image { background-position: center center !important; }
  /* Apagamos el zoom en celular */
  .modal-image-container:hover .modal-image { transform: none; }

  .modal-info { width: 100%; padding: 25px; }
  .product-modal { width: 95%; max-height: 90vh; overflow-y: auto; }
}

/* =========================================
   14. ANIMACIÓN DE BOTÓN "AGREGADO"
========================================= */
.btn-added {
  background-color: #111 !important; /* Negro profundo elegante */
  color: #fff !important;
  border-color: #111 !important;
  pointer-events: none; /* Bloquea el botón 1 seg para evitar doble clic accidental */
  transition: all 0.3s ease;
}

/* =========================================
   15. EFECTO HOVER EN BOTONES
========================================= */

/* 1. Transición suave para que no sea un cambio brusco */
.card .add, .btnPrimary {
  transition: all 0.3s ease !important;
}

/* 2. El efecto al pasar el mouse en el botón de la tarjeta */
.card .add:hover {
  background-color: #e2b8e6; /* Se aclara a un gris oscuro */
  transform: translateY(-2px); /* Se levanta un poquitito */
  box-shadow: 0 4px 10px rgba(0,0,0,0.15); /* Proyecta una sombra sutil */
}

/* 3. El efecto al pasar el mouse en el botón del Modal y portada */
.btnPrimary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(226, 184, 230, 0.2);
}