/* Tienda pública */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.top-links { display: flex; align-items: center; gap: 6px; }
.top-link { font-size: 0.9rem; font-weight: 600; text-decoration: none; padding: 8px 10px; color: var(--lilac); }
.cart-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; color: var(--ink); }
.cart-btn:hover { background: var(--mist); }
.cart-count {
  position: absolute; top: 3px; right: 1px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--rose); color: #fff; font-size: 0.72rem; font-weight: 700; display: grid; place-items: center;
}
.cats { border-top: 1px solid var(--line); }
.cats-row { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 2px; padding-bottom: 2px; }
.cats-row::-webkit-scrollbar { display: none; }
.cats-row a { flex: none; padding: 10px 12px; font-size: 0.9rem; text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.cats-row a[aria-current='page'] { color: var(--ink); border-color: var(--rose); font-weight: 600; }

main { min-height: 60vh; outline: none; }
.section { padding: clamp(40px, 7vw, 80px) 0; }
.section.mist { background: var(--mist); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head p { max-width: 46ch; }
.link { color: var(--rose); font-weight: 600; text-decoration: none; white-space: nowrap; }
.link:hover { text-decoration: underline; }

/* Portada */
.hero { padding: clamp(28px, 6vw, 64px) 0 clamp(36px, 6vw, 72px); background: linear-gradient(180deg, var(--mist) 0%, #fff 100%); }
.hero-grid { display: grid; gap: 28px; align-items: center; }
.hero h1 { max-width: 13ch; }
.hero p { margin-top: 16px; font-size: 1.08rem; max-width: 40ch; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-photos { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.hero-photos a { display: block; border-radius: var(--r); overflow: hidden; background: #fff; aspect-ratio: 39 / 50; }
.hero-photos a:nth-child(2) { transform: translateY(-18px); }
.hero-photos img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1fr 1.05fr; }
}

/* Índice de categorías: la pieza tipográfica de la portada */
.directory { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.directory li { border-bottom: 1px solid var(--line); }
.directory a {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 16px; padding: 16px 2px; text-decoration: none;
}
.directory .dname { font-family: var(--display); font-size: clamp(1.55rem, 5.4vw, 2.6rem); line-height: 1.1; transition: color 0.15s, padding 0.2s; }
.directory .dcount { font-family: var(--display); font-style: italic; color: var(--ink-3); font-size: 1.05rem; }
.directory .ddesc { grid-column: 1 / -1; color: var(--ink-2); font-size: 0.9rem; }
.directory a:hover .dname { color: var(--rose); padding-left: 8px; }

/* Grilla de productos */
.seg-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 20px; }
.seg-row::-webkit-scrollbar { display: none; }
.seg {
  flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  font-weight: 600; font-size: 0.9rem; cursor: pointer; color: var(--ink-2);
}
.seg[aria-pressed='true'] { background: var(--ink); color: #fff; border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 14px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1020px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 32px 20px; } }
.card { text-decoration: none; display: grid; gap: 8px; }
.card .ph { aspect-ratio: 39 / 50; border-radius: var(--r); overflow: hidden; background: var(--mist); }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.card:hover img { transform: scale(1.03); }
.card .nm { font-weight: 600; line-height: 1.25; }
.card .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card .pr { font-family: var(--display); font-size: 1.15rem; }
.card .sg { font-size: 0.8rem; color: var(--ink-3); }
.noimg { display: grid; place-items: center; height: 100%; font-family: var(--display); font-style: italic; font-size: 1.4rem; color: var(--ink-3); padding: 12px; text-align: center; }

.page-head { padding: 28px 0 18px; }
.page-head p { margin-top: 8px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.toolbar select { min-height: 40px; border: 1.5px solid var(--line); border-radius: 999px; padding: 0 12px; background: #fff; font-size: 0.9rem; }
.empty { padding: 36px 0 60px; max-width: 46ch; }
.empty h2 { margin-bottom: 10px; }
.empty .btn { margin-top: 18px; }

/* Producto */
.pdp { display: grid; gap: 24px; padding-top: 20px; padding-bottom: 64px; }
@media (min-width: 900px) { .pdp { grid-template-columns: 1.1fr 1fr; gap: 48px; padding-top: 36px; align-items: start; } .pdp .gallery { position: sticky; top: 130px; } }
.gallery { position: relative; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r-lg); background: var(--mist); }
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: none; width: 100%; aspect-ratio: 39 / 50; object-fit: cover; scroll-snap-align: start; }
.dots { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.dots button { width: 8px; height: 8px; padding: 0; border-radius: 999px; border: 0; background: var(--line); cursor: pointer; }
.dots button[aria-current='true'] { background: var(--ink); width: 22px; }
.thumbs { display: none; }
@media (min-width: 900px) {
  .thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
  .thumbs button { padding: 0; border: 1.5px solid transparent; border-radius: var(--r-sm); overflow: hidden; cursor: pointer; background: var(--mist); }
  .thumbs button[aria-current='true'] { border-color: var(--ink); }
  .thumbs img { aspect-ratio: 39 / 50; object-fit: cover; }
  .dots { display: none; }
}
.crumbs { font-size: 0.85rem; color: var(--ink-3); margin-bottom: 10px; }
.crumbs a { color: var(--ink-2); }
.pdp h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
.pdp .price { font-family: var(--display); font-size: 1.9rem; margin: 12px 0 4px; }
.pdp .opt { margin-top: 22px; }
.pdp .opt .label { display: block; margin-bottom: 8px; }
.pdp .buy { display: grid; gap: 10px; margin-top: 26px; }
.pdp .desc { margin-top: 24px; color: var(--ink-2); max-width: 52ch; }
.note-box { margin-top: 22px; padding: 14px 16px; border-radius: var(--r); background: var(--mist); font-size: 0.9rem; color: var(--ink-2); }

/* Carrito */
.cart { display: grid; gap: 28px; padding-bottom: 64px; }
@media (min-width: 900px) { .cart { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.line { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line img, .line .noimg { width: 76px; aspect-ratio: 39 / 50; object-fit: cover; border-radius: var(--r-sm); background: var(--mist); font-size: 0.8rem; }
.line .top-l { display: flex; justify-content: space-between; gap: 10px; }
.line .nm { font-weight: 600; }
.line .vr { font-size: 0.85rem; color: var(--ink-2); }
.line .bot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.line .rm { border: 0; background: none; color: var(--ink-3); font-size: 0.85rem; text-decoration: underline; cursor: pointer; padding: 4px; }
.panel-box { background: var(--mist); border-radius: var(--r-lg); padding: 22px; }
.panel-box h2 { font-size: 1.6rem; margin-bottom: 16px; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); margin-top: 6px; }
.total-row b { font-family: var(--display); font-size: 1.7rem; font-weight: 500; }
.radio-cards { display: grid; gap: 8px; margin-bottom: 14px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r); background: #fff; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--ink); }
.radio-card input { margin-top: 4px; accent-color: var(--ink); }
.radio-card small { display: block; color: var(--ink-3); }

.thanks { padding: 48px 0 80px; max-width: 560px; }
.thanks .code { font-family: var(--display); font-style: italic; font-size: 1.3rem; color: var(--rose); }
.thanks h1 { margin: 6px 0 14px; font-size: clamp(2rem, 6vw, 3rem); }
.thanks .btn { margin-top: 22px; }

/* Distribuidoras (banda en portada) */
.dist-band { background: var(--lilac-mist); }
.dist-grid { display: grid; gap: 24px; }
.dist-band h2 { max-width: 16ch; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid rgba(111, 90, 168, 0.25); }
.facts li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 12px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid rgba(111, 90, 168, 0.25); }
.facts b { font-family: var(--display); font-size: 1.9rem; font-weight: 500; color: var(--lilac); line-height: 1; }
@media (min-width: 860px) { .dist-grid { grid-template-columns: 1fr 1.1fr; align-items: center; } }

/* Tienda física */
.visit { display: grid; gap: 18px; }
@media (min-width: 860px) { .visit { grid-template-columns: 1.2fr 1fr; align-items: end; } }
.visit .actions { display: flex; gap: 10px; flex-wrap: wrap; }

.foot { border-top: 1px solid var(--line); padding: 36px 0 90px; }
.foot-grid { display: grid; gap: 20px; }
.foot-grid p { margin-top: 8px; max-width: 32ch; }
.foot-links { display: grid; gap: 8px; font-weight: 600; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--rose); }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1fr auto; } }

.wa-float {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; width: 56px; height: 56px; border-radius: 999px;
  display: grid; place-items: center; background: #1f7a4d; color: #fff; box-shadow: 0 6px 20px rgba(43, 22, 48, 0.25);
}
