/* Tienda Distriplinios — mismos tokens que la landing (landing → tienda sin rediseño) */
:root {
  --surface: #FAF3E7;
  --card: #FFFFFF;
  --ink: #3E2F23;
  --ink-soft: #66563F;
  --line: rgba(62, 47, 35, 0.12);
  /* Marca: rojo del logo (5,0:1 con texto blanco); el coral no lo era. */
  --accent: #D32F2F;
  --accent-deep: #B71C1C;
  --sage: #A8BFA0;
  --sage-deep: #7FA070;
  --honey: #F2C879;
  --danger: #C4534A;
  --radius: 18px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --font: "Nunito", system-ui, sans-serif;
  --shadow: 0 10px 34px rgba(36, 27, 20, 0.10);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
body { font-family: var(--font); background: var(--surface); color: var(--ink); }
img { max-width: 100%; display: block; }

/* ───── Topbar ───── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(250, 243, 231, 0.8);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.brand img { height: 40px; }
.topnav { display: flex; align-items: center; gap: 20px; }
.topnav a { font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: none; }
.topnav a:hover { color: var(--accent-deep); }
.mayorista-chip {
  font-size: 12px; font-weight: 900; color: #fff;
  background: var(--sage-deep); padding: 5px 12px; border-radius: 99px;
}

/* ───── PDP ───── */
.pdp { max-width: 1180px; margin: 0 auto; padding: 26px clamp(16px, 4vw, 40px) 60px; }
.crumb { font-size: 13px; color: var(--ink-soft); margin-bottom: 18px; }
.crumb a { color: var(--ink-soft); text-decoration: none; }
.crumb a:hover { color: var(--accent-deep); }

.pdp-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 4vw, 48px); align-items: start; }

/* Galería */
.galeria { position: sticky; top: 86px; }
.galeria .main {
  border-radius: var(--radius); overflow: hidden; background: #fff;
  box-shadow: var(--shadow); aspect-ratio: 1; display: grid; place-items: center;
}
.galeria .main img { width: 100%; height: 100%; object-fit: contain; padding: 18px; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button {
  flex: 0 0 74px; height: 74px; border-radius: 12px; border: 2px solid var(--line);
  background: #fff; cursor: pointer; overflow: hidden; padding: 4px;
  transition: border-color .2s;
}
.thumbs button.on { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }

/* Info */
.info h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 900; line-height: 1.1; letter-spacing: -0.01em; }
.ref { margin-top: 6px; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.ref b { color: var(--ink); font-weight: 800; }

.precio-box { margin: 18px 0 4px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.precio { font-size: 38px; font-weight: 900; letter-spacing: -0.02em; }
.precio small { font-size: 18px; font-weight: 800; color: var(--ink-soft); }
.precio-desde { font-size: 14px; color: var(--ink-soft); font-weight: 700; }
.stock-pill { font-size: 12.5px; font-weight: 900; padding: 5px 12px; border-radius: 99px; }
.stock-pill.ok { background: rgba(127, 160, 112, .18); color: var(--sage-deep); }
.stock-pill.bajo { background: rgba(242, 200, 121, .25); color: #9A7A1E; }
.stock-pill.agotado { background: rgba(196, 83, 74, .15); color: var(--danger); }

/* Selectores de variante */
.sel { margin-top: 18px; }
.sel .etiqueta { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.sel .etiqueta .elegido { color: var(--ink-soft); font-weight: 700; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  min-width: 52px; padding: 9px 14px; border-radius: 12px;
  border: 2px solid var(--line); background: #fff; cursor: pointer;
  font: 800 14px var(--font); color: var(--ink);
  transition: all .18s var(--ease);
}
.chip:hover { border-color: var(--ink-soft); }
.chip.on { border-color: var(--accent); background: rgba(211, 47, 47, .12); }
.chip:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.swatch {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 3px solid #fff; outline: 2px solid var(--line);
  transition: transform .18s var(--ease), outline-color .18s;
  position: relative;
}
.swatch:hover { transform: scale(1.08); }
.swatch.on { outline: 3px solid var(--accent); transform: scale(1.12); }
.swatch:disabled { opacity: .3; cursor: not-allowed; }

/* Stepper + subtotal */
.compra { margin-top: 22px; border: 1px solid var(--line); background: var(--card);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.fila-compra { display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; }
.stepper { display: flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.stepper button { width: 44px; height: 44px; border: 0; background: transparent; font: 900 20px var(--font); cursor: pointer; color: var(--ink); }
.stepper button:hover { background: rgba(62,47,35,.06); }
.stepper input { width: 54px; height: 44px; border: 0; text-align: center; font: 900 16px var(--font); color: var(--ink); background: transparent; }
.subtotal-linea { font-size: 15px; font-weight: 800; }
.subtotal-linea s { color: var(--ink-soft); font-weight: 700; margin-right: 8px; }

/* Barra mayorista */
.mayorista { margin-top: 16px; }
.mayorista .barra { height: 10px; border-radius: 99px; background: rgba(62,47,35,.1); overflow: hidden; }
.mayorista .barra span { display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--honey), var(--sage-deep));
  border-radius: 99px; transition: width .4s var(--ease); }
.mayorista p { font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-top: 8px; }
.mayorista p b { color: var(--ink); }
.mayorista.logrado p { color: var(--sage-deep); font-weight: 900; }

.ctas { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.btn {
  flex: 1 1 auto; text-align: center; padding: 15px 22px; border-radius: 999px;
  font: 900 15px var(--font); text-decoration: none; cursor: pointer; border: none;
  transition: transform .2s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primario { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(183, 28, 28,.4); }
.btn-primario:hover { background: var(--accent-deep); }
.btn-wsp { background: #25D366; color: #fff; }
.btn-fantasma { background: transparent; border: 2px solid var(--line); color: var(--ink); }

/* Specs + entrega */
.specs { margin-top: 18px; display: grid; gap: 8px; }
.spec { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.spec .ic { width: 34px; height: 34px; border-radius: 10px; background: rgba(168,191,160,.25);
  display: grid; place-items: center; font-size: 16px; }

/* Descripción */
.descripcion { margin-top: 46px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(20px, 3vw, 36px); }
.descripcion h2 { font-size: 22px; font-weight: 900; margin-bottom: 12px; }
.descripcion .cuerpo { color: var(--ink); line-height: 1.65; font-size: 15.5px; }
.descripcion .cuerpo h2, .descripcion .cuerpo h4 { margin: 14px 0 6px; font-size: 16px; }
.descripcion .cuerpo p { margin-bottom: 10px; }

/* Relacionados */
.relacionados { margin-top: 40px; }
.relacionados h2 { font-size: 22px; font-weight: 900; margin-bottom: 16px; }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.rel-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--ink);
  transition: transform .25s var(--ease), box-shadow .25s;
  display: block;
}
.rel-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.rel-card .img { aspect-ratio: 1; background: #fff; display: grid; place-items: center; padding: 14px; }
.rel-card img { max-height: 100%; object-fit: contain; }
.rel-card .cuerpo { padding: 12px 14px 16px; }
.rel-card h3 { font-size: 14.5px; font-weight: 800; line-height: 1.3; min-height: 38px; }
.rel-card .precio { font-size: 18px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-weight: 800; font-size: 14px;
  padding: 13px 22px; border-radius: 99px; z-index: 90; box-shadow: var(--shadow);
}
.cargando { padding: 80px 0; text-align: center; color: var(--ink-soft); font-weight: 700; }

.foot { text-align: center; padding: 22px; font-size: 12.5px; color: var(--ink-soft);
  border-top: 1px solid var(--line); }

/* ───────── VITRINA ───────── */
.v-hero {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(50px, 9vh, 100px) 20px 40px;
}
.v-hero-logo { height: clamp(80px, 12vw, 120px); margin-bottom: 14px;
  filter: drop-shadow(0 8px 24px rgba(36,27,20,.18)); animation: flotar 5s ease-in-out infinite; }
@keyframes flotar { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }
.v-hero h1 { font-size: clamp(34px, 6vw, 64px); font-weight: 900; line-height: 1.02; letter-spacing: -0.02em; }
.v-hero h1 em { font-style: normal; color: var(--accent); }
.v-hero-sub { margin-top: 14px; color: var(--ink-soft); font-weight: 700; font-size: clamp(14px, 2vw, 17px); line-height: 1.6; }
.v-hero-sub b { color: var(--ink); }
.v-blobs span {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; z-index: -1;
  animation: blob 12s ease-in-out infinite alternate;
}
.v-blobs span:nth-child(1) { width: 340px; height: 340px; background: var(--honey); top: -120px; left: -80px; }
.v-blobs span:nth-child(2) { width: 300px; height: 300px; background: var(--sage); bottom: -140px; right: -60px; animation-delay: 3s; }
.v-blobs span:nth-child(3) { width: 220px; height: 220px; background: #F3C1B4; top: 30%; right: 12%; animation-delay: 6s; }
@keyframes blob { from { transform: scale(1) translate(0,0) } to { transform: scale(1.25) translate(30px,-20px) } }

.v-filtros {
  position: sticky; top: 65px; z-index: 20;
  display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap;
  padding: 12px 16px; margin: 0 16px 26px;
  background: rgba(250,243,231,.85); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 99px;
}
.v-chips { display: flex; gap: 8px; }
.vchip {
  border: 2px solid var(--line); background: #fff; border-radius: 99px;
  padding: 8px 16px; font: 800 13.5px var(--font); color: var(--ink); cursor: pointer;
  transition: all .18s var(--ease);
}
.vchip:hover { border-color: var(--ink-soft); transform: translateY(-1px); }
.vchip.on { border-color: var(--accent); background: rgba(211, 47, 47,.14); }
.v-orden select { border-radius: 99px; padding: 9px 14px; font-size: 13.5px; }

.v-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px; max-width: 1280px; margin: 0 auto; padding: 0 20px 80px;
}
.vcard {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 6px 22px rgba(36,27,20,.07);
  animation: entrar .6s var(--ease) both; animation-delay: var(--d, 0ms);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.vcard:hover { transform: translateY(-6px) rotate(-.3deg); box-shadow: 0 18px 44px rgba(36,27,20,.14); }
@keyframes entrar { from { opacity: 0; transform: translateY(24px) scale(.97) } to { opacity: 1 } }

.v-img { position: relative; aspect-ratio: 1.25; background: #fff; display: grid; place-items: center; padding: 18px; }
.v-img img { max-height: 100%; object-fit: contain; }
.v-refs {
  position: absolute; top: 12px; left: 12px; font: 900 11px var(--font);
  background: var(--ink); color: #fff; padding: 5px 10px; border-radius: 99px;
}
.v-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.v-nombre { font-weight: 800; font-size: 14.5px; line-height: 1.3; color: var(--ink); text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.v-nombre:hover { color: var(--accent-deep); }
.v-precio { font-size: 21px; font-weight: 900; }
.v-precio small { font-size: 12.5px; color: var(--ink-soft); font-weight: 800; margin-right: 4px; }

.v-attrs { display: grid; gap: 6px; }
.v-attr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.v-attr-n { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); min-width: 52px; }
.chips.mini { gap: 5px; }
.mini-chip { min-width: 0; padding: 5px 10px; font-size: 12px; border-radius: 9px; }
.mini-sw { width: 26px; height: 26px; }
.v-elegir { font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.v-estado { min-height: 22px; }

.v-compra { display: flex; gap: 8px; margin-top: auto; align-items: center; }
.mini-st { transform: scale(.9); transform-origin: left; }
.v-add { padding: 11px 16px; font-size: 13.5px; flex: 1; }

/* Carrito flotante */
.v-cart {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; border: none; border-radius: 20px;
  padding: 10px 16px 10px 12px; font-family: var(--font); cursor: pointer;
  box-shadow: 0 14px 40px rgba(36,27,20,.35); width: 232px; text-align: left;
}
.v-cart-icon { font-size: 20px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.12); display: grid; place-items: center; }
.vc-cuerpo { display: grid; gap: 5px; }
.vc-linea { font-size: 12.5px; font-weight: 800; line-height: 1; white-space: nowrap; }
.vc-linea b { font-size: 14px; }
.vc-linea span { opacity: .7; font-weight: 700; font-size: 12px; }
.vc-cuerpo small { font-size: 12px; color: rgba(255,255,255,.75); font-weight: 700; line-height: 1.2; }
.v-cart-barra { display: block; width: 100%; height: 5px; border-radius: 99px;
  background: rgba(255,255,255,.18); overflow: hidden; }

.v-cart-panel {
  position: fixed; right: 16px; bottom: 92px; z-index: 41;
  width: min(360px, calc(100vw - 32px));
  background: #fff; border-radius: 20px; border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(36,27,20,.28); padding: 18px;
  display: grid; gap: 12px;
}
.v-cart-panel h3 { font-size: 16px; font-weight: 900; }
.v-ci { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.v-ci small { color: var(--ink-soft); font-weight: 600; }
.v-ci-del { border: none; background: none; color: var(--danger); font: 800 11.5px var(--font); cursor: pointer; padding: 0; }
.v-cart-total { font-size: 16px; font-weight: 900; display: flex; gap: 8px; align-items: center; }
.v-m-tag { background: var(--sage-deep); color: #fff; font-size: 12px; font-weight: 900; padding: 4px 9px; border-radius: 99px; }

@media (max-width: 900px) {
  .pdp-grid { grid-template-columns: 1fr; }
  .galeria { position: static; }
}

/* ───────── Pie compartido ───────── */
.pie { background: #241B14; color: rgba(255,255,255,.72); margin-top: 40px; }
.pie-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 26px;
  max-width: 1180px; margin: 0 auto; padding: 44px 20px 26px; }
.pie h3 { color: #fff; font-size: 13px; font-weight: 900; text-transform: uppercase;
  letter-spacing: .08em; margin-bottom: 12px; }
.pie a { color: rgba(255,255,255,.72); text-decoration: none; display: block;
  font-size: 13.5px; font-weight: 700; margin-bottom: 8px; }
.pie a:hover { color: var(--honey); }
.pie-bajo { border-top: 1px solid rgba(255,255,255,.12); max-width: 1180px; margin: 0 auto;
  padding: 16px 20px 26px; display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pie-pagos { height: 34px; border-radius: 8px; background: #fff; padding: 3px 6px; }
.pie-bajo p { font-size: 12px; }
@media (max-width: 720px) { .pie-grid { grid-template-columns: 1fr 1fr; } }

/* ───────── Páginas de contenido ───────── */
.pagina { max-width: 860px; margin: 0 auto; padding: 34px 20px 20px; }
.pagina h1 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 900; line-height: 1.05; margin-bottom: 18px; }
.pagina h2 { font-size: 20px; font-weight: 900; margin: 26px 0 10px; }
.pagina p, .pagina li { font-size: 15.5px; line-height: 1.7; color: var(--ink); margin-bottom: 10px; }
.pagina ul, .pagina ol { padding-left: 22px; margin-bottom: 14px; }
.destacado { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin: 18px 0; }
.foto { border-radius: var(--radius); box-shadow: var(--shadow); margin: 18px 0; max-height: 360px; object-fit: cover; width: 100%; }
.contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 760px) { .contacto-grid { grid-template-columns: 1fr; } }

/* ───────── Secciones de la vitrina ───────── */
.v-seccion { max-width: 1180px; margin: 0 auto; padding: 8px 20px 46px; }
.v-seccion h2 { font-size: clamp(22px, 3.4vw, 34px); font-weight: 900; margin-bottom: 18px; text-align: center; }
.beneficios { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.benef { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; text-align: center;
  box-shadow: 0 4px 16px rgba(36,27,20,.05); }
.benef img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; }
.benef b { display: block; font-size: 14px; }
.benef small { color: var(--ink-soft); font-weight: 700; font-size: 12.5px; }
.testimonios { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
.testimonios img { height: 170px; border-radius: 14px; border: 1px solid var(--line); scroll-snap-align: start; }
.aviso-mayorista { background: linear-gradient(90deg, var(--honey), #f7ddb0); border-radius: var(--radius);
  padding: 18px 22px; margin: 0 auto 34px; text-align: center; max-width: 1140px; }
.aviso-mayorista b { font-size: 15px; }

/* ───────── Menú móvil ───────── */
#burger { display: none; background: none; border: 0; font-size: 22px; cursor: pointer;
  color: var(--ink); padding: 4px 8px; }
#menuMovil { position: fixed; top: 62px; right: 12px; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 10px; display: grid; gap: 2px; min-width: 190px; }
#menuMovil a { padding: 11px 14px; border-radius: 10px; text-decoration: none;
  color: var(--ink); font-weight: 800; font-size: 14px; }
#menuMovil a:hover { background: rgba(62,47,35,.06); }
@media (max-width: 760px) {
  .solo-escritorio { display: none; }
  #burger { display: block; }
  .topnav { gap: 10px; }
}

/* Carrito */
.ci-img { width: 58px; height: 58px; object-fit: contain; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); flex: 0 0 58px; padding: 4px; }
.cart-items .ci { align-items: center; }
.ci-datos { flex: 1; min-width: 0; }
.ci-datos b { display: block; line-height: 1.3; }
.ci-datos small { margin-top: 4px; display: block; }
.compartir { display: flex; gap: 14px; align-items: center; margin-top: 16px; font-size: 13px; font-weight: 700; color: var(--ink-soft); flex-wrap: wrap; }
.compartir a { color: var(--accent-deep); font-weight: 800; text-decoration: none; }
.compartir a:hover { text-decoration: underline; }
.v-oferta { position: absolute; top: 12px; left: 12px; font: 900 11px var(--font);
  background: var(--accent); color: #fff; padding: 5px 10px; border-radius: 99px; }
.v-destacado { background: var(--sage-deep); }
.v-refs { left: auto; right: 12px; }
