/* Página web pública de la tienda (diseño basado en demo_tienda/tienda_web). */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f4f1;
  --text: #1c1c1c;
  --muted: #6f6a64;
  --line: #e7e2dc;
  --accent: #b5704a;
  --accent-dark: #8f5536;
  --dark: #151515;
  --success: #2e7d4f;
  --danger: #c0392b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .08);
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --serif: "Playfair Display", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
body.lock { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
.container { width: min(1240px, 92%); margin-inline: auto; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .85rem 1.6rem; border-radius: 999px; font-weight: 600; font-size: .95rem; transition: .2s; border: 1.5px solid transparent; }
.btn--dark { background: var(--dark); color: #fff; }
.btn--dark:hover { background: var(--accent); }
.btn--dark:disabled { opacity: .5; cursor: not-allowed; background: var(--dark); }
.btn--light { background: #fff; color: var(--dark); }
.btn--light:hover { background: var(--accent); color: #fff; }
.btn--ghost { border-color: #fff; color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--dark); }
.btn--outline { border-color: var(--line); background: #fff; }
.btn--outline:hover { border-color: var(--dark); }
.btn--link { color: var(--muted); text-decoration: underline; padding: .6rem; }
.btn--whatsapp { background: #25d366; color: #fff; margin-top: 1rem; }
.btn--whatsapp:hover { background: #1da851; }
.btn--sm { padding: .55rem 1rem; font-size: .85rem; }
.btn--block { width: 100%; }

.icon-btn { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; transition: .2s; }
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badge-count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
.badge-count.bump { animation: bump .4s; }
@keyframes bump { 50% { transform: scale(1.4); } }

/* ---------- Anuncio + Header ---------- */
.announcement { background: var(--dark); color: #fff; text-align: center; font-size: .82rem; padding: .55rem 1rem; }
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; gap: 1.5rem; height: 72px; }
.logo { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; letter-spacing: .5px; }
.logo--light { color: #fff; display: inline-block; margin-bottom: .6rem; }
.nav { display: flex; gap: 1.6rem; margin-inline: auto; }
.nav a { font-size: .92rem; font-weight: 500; position: relative; padding: .3rem 0; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--accent); transition: .25s; }
.nav a:hover::after { width: 100%; }
.header__actions { display: flex; gap: .2rem; margin-left: auto; }
.nav + .header__actions { margin-left: 0; }
.burger { display: none; }
.searchbar { max-height: 0; overflow: hidden; transition: max-height .3s; border-top: 1px solid transparent; }
.searchbar.open { max-height: 90px; border-top-color: var(--line); }
.searchbar input { width: 100%; padding: 1rem 0; border: 0; outline: none; background: transparent; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 78vh; display: flex; align-items: center; color: #fff;
  background: radial-gradient(circle at 80% 20%, rgba(240, 201, 168, .35), transparent 45%), linear-gradient(135deg, #151515, #3a2c24 55%, #b5704a); }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.65), rgba(0,0,0,.15)); }
.hero__content { position: relative; max-width: 1240px; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: 3px; font-size: .78rem; margin-bottom: 1rem; opacity: .9; }
.hero h1 { font-family: var(--serif); font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1.05; margin-bottom: 1rem; }
.hero h1 em { color: #f0c9a8; }
.hero p { font-size: 1.15rem; max-width: 480px; opacity: .92; margin-bottom: 2rem; }
.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Perks ---------- */
.perks { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.perks__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1.6rem 0; }
.perk { display: flex; gap: .8rem; align-items: center; }
.perk span { font-size: 1.6rem; }
.perk strong { display: block; font-size: .92rem; }
.perk small { color: var(--muted); }

/* ---------- Secciones ---------- */
.section { padding: 4.5rem 0 1rem; }
.section__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.8rem; gap: 1rem; flex-wrap: wrap; }
.section__head h2 { font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.4rem); }

.categories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.cat-card { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/5; background: var(--bg-soft); }
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.cat-card:hover img { transform: scale(1.06); }
.cat-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 55%); }
.cat-card span { position: absolute; left: 1.4rem; bottom: 1.2rem; z-index: 1; color: #fff; font-family: var(--serif); font-size: 1.8rem; }

/* ---------- Tienda ---------- */
.shop { display: grid; grid-template-columns: 250px 1fr; gap: 2.2rem; align-items: start; }
.filters { position: sticky; top: 96px; }
.filters__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.filters__close { display: none; }
.filter-group { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.filter-group h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: .7rem; }
.filter-group label { display: flex; align-items: center; gap: .55rem; font-size: .93rem; padding: .22rem 0; cursor: pointer; }
.filter-group input[type="radio"], .filter-group input[type="checkbox"] { accent-color: var(--dark); width: 16px; height: 16px; }
.filter-group input[type="range"] { width: 100%; accent-color: var(--accent); }
.filters .btn { margin-top: 1.2rem; }
.size-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 8px; font-size: .82rem; transition: .15s; background: #fff; }
.chip:hover { border-color: var(--dark); }
.chip.active { background: var(--dark); color: #fff; border-color: var(--dark); }
.chip:disabled { color: #bbb; text-decoration: line-through; cursor: not-allowed; background: var(--bg-soft); border-color: var(--line); }
.card__badge--agotado { background: #777; color: #fff; }
.card--soldout .card__media img { filter: grayscale(.85); opacity: .7; }

.toolbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.toolbar select { margin-left: auto; padding: .6rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.filters-toggle { display: none; }
.active-filters { display: flex; gap: .4rem; flex-wrap: wrap; }
.active-filters .tag { background: var(--bg-soft); padding: .3rem .7rem; border-radius: 999px; font-size: .8rem; display: inline-flex; gap: .4rem; align-items: center; }
.active-filters .tag button { font-size: .9rem; line-height: 1; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.8rem 1.4rem; }
.card { display: flex; flex-direction: column; animation: fadeUp .45s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
.card__media { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3/4; background: var(--bg-soft); cursor: pointer; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card:hover .card__media img { transform: scale(1.05); }
.card__badge { position: absolute; top: .8rem; left: .8rem; background: #fff; padding: .25rem .65rem; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.card__badge--oferta { background: var(--danger); color: #fff; }
.card__badge--nuevo { background: var(--dark); color: #fff; }
.card__wish { position: absolute; top: .7rem; right: .7rem; width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow); transition: .2s; }
.card__wish svg { width: 18px; height: 18px; fill: none; stroke: var(--text); stroke-width: 2; }
.card__wish.active svg { fill: var(--danger); stroke: var(--danger); }
.card__wish:hover { transform: scale(1.1); }
.card__quick { position: absolute; left: .8rem; right: .8rem; bottom: .8rem; background: var(--dark); color: #fff; padding: .75rem; border-radius: 999px; font-weight: 600; font-size: .88rem; opacity: 0; transform: translateY(10px); transition: .25s; }
.card:hover .card__quick { opacity: 1; transform: none; }
.card__quick:hover { background: var(--accent); }
.card__body { padding: .9rem .2rem 0; }
.card__type { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.card__name { font-weight: 600; margin: .15rem 0 .3rem; cursor: pointer; }
.card__name:hover { color: var(--accent); }
.rating { color: #e0a526; font-size: .82rem; }
.rating small { color: var(--muted); margin-left: .25rem; }
.price { display: flex; gap: .55rem; align-items: baseline; margin-top: .25rem; }
.price strong { font-size: 1.05rem; }
.price del { color: var(--muted); font-size: .88rem; }
.price .off { color: var(--danger); font-size: .8rem; font-weight: 700; }
.swatches { display: flex; gap: .3rem; margin-top: .5rem; }
.swatch-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.empty { text-align: center; padding: 4rem 1rem; }
.empty p { margin-bottom: 1rem; font-size: 1.1rem; }

/* ---------- Promo ---------- */
.promo { margin-top: 4.5rem; background: linear-gradient(120deg, var(--dark), #3a2c24 60%, var(--accent)); color: #fff; }
.promo__inner { display: flex; justify-content: space-between; align-items: center; gap: 2rem; padding: 3.5rem 0; flex-wrap: wrap; }
.promo h2 { font-family: var(--serif); font-size: 2.2rem; }
.promo p { opacity: .85; }
.newsletter { display: flex; gap: .5rem; flex: 1; max-width: 460px; }
.newsletter input { flex: 1; padding: .85rem 1.2rem; border-radius: 999px; border: 0; outline: none; min-width: 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; transition: .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin-top: .7rem; }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; padding-bottom: 4rem; }
.contact__info ul { list-style: none; margin-top: 1.2rem; display: grid; gap: .6rem; }
.contact__form, .form { display: grid; gap: .9rem; }
.contact__form input, .contact__form textarea, .form input, .form select, .form textarea {
  width: 100%; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 10px; outline: none; background: #fff; transition: .2s; }
.contact__form input:focus, .contact__form textarea:focus, .form input:focus, .form select:focus, .form textarea:focus { border-color: var(--dark); }
.invalid { border-color: var(--danger) !important; background: #fff6f5 !important; }
.field-error { color: var(--danger); font-size: .78rem; margin-top: -.5rem; }

/* ---------- Footer ---------- */
.footer { background: var(--dark); color: #cfcac4; padding-top: 3.5rem; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
.footer h4 { color: #fff; margin-bottom: 1rem; font-size: .95rem; }
.footer__grid > div > a:not(.logo) { display: block; padding: .25rem 0; font-size: .92rem; }
.footer a:hover { color: #fff; }
.social { display: flex; gap: .5rem; margin-top: 1rem; }
.social a { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #444; border-radius: 50%; font-size: .75rem; font-weight: 700; }
.social a:hover { background: var(--accent); border-color: var(--accent); }
.payments { display: flex; gap: .4rem; flex-wrap: wrap; }
.payments span { background: #fff; color: var(--dark); font-size: .72rem; font-weight: 700; padding: .3rem .55rem; border-radius: 5px; }
.footer__bottom { border-top: 1px solid #2c2c2c; margin-top: 2.5rem; padding: 1.4rem 0; text-align: center; }

/* ---------- Overlay / Drawer / Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); opacity: 0; visibility: hidden; transition: .3s; z-index: 90; }
.overlay.show { opacity: 1; visibility: visible; }
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(430px, 100%); background: #fff; z-index: 100; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .35s cubic-bezier(.4,0,.2,1); box-shadow: -10px 0 40px rgba(0,0,0,.12); }
.drawer.open { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line); }
.drawer__head h3 { font-family: var(--serif); font-size: 1.4rem; }
.drawer__body { flex: 1; overflow-y: auto; padding: 1rem 1.4rem; }
.drawer__foot { padding: 1.2rem 1.4rem; border-top: 1px solid var(--line); background: var(--bg-soft); }
.ship-progress { padding: .9rem 1.4rem; font-size: .85rem; border-bottom: 1px solid var(--line); }
.ship-progress .bar { height: 6px; background: var(--line); border-radius: 99px; margin-top: .5rem; overflow: hidden; }
.ship-progress .bar span { display: block; height: 100%; background: var(--success); transition: width .4s; }

.line-item { display: grid; grid-template-columns: 80px 1fr auto; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.line-item img { width: 80px; height: 100px; object-fit: cover; border-radius: 10px; background: var(--bg-soft); }
.line-item h5 { font-size: .93rem; }
.line-item small { color: var(--muted); display: block; }
.line-item__right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.remove-btn { color: var(--muted); font-size: .8rem; text-decoration: underline; }
.remove-btn:hover { color: var(--danger); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; margin-top: .5rem; background: #fff; }
.qty button { width: 30px; height: 30px; font-size: 1rem; }
.qty span { min-width: 24px; text-align: center; font-size: .9rem; font-weight: 600; }
.drawer-empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.drawer-empty .big { font-size: 3rem; margin-bottom: .5rem; }
.drawer-empty .btn { margin-top: 1rem; }

.coupon { display: flex; gap: .5rem; margin-bottom: 1rem; }
.coupon input { flex: 1; padding: .55rem .9rem; border: 1px solid var(--line); border-radius: 999px; outline: none; text-transform: uppercase; min-width: 0; }
.totals { display: grid; gap: .35rem; margin-bottom: 1rem; font-size: .92rem; }
.totals div { display: flex; justify-content: space-between; }
.totals .discount { color: var(--success); }
.totals .grand { font-size: 1.15rem; font-weight: 700; border-top: 1px solid var(--line); padding-top: .6rem; margin-top: .3rem; }
.totals .applied-coupon button { color: var(--danger); font-size: .78rem; margin-left: .4rem; text-decoration: underline; }

.modal { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 1rem; visibility: hidden; opacity: 0; transition: .25s; }
.modal.open { visibility: visible; opacity: 1; }
.modal__box { position: relative; background: #fff; border-radius: 18px; width: min(940px, 100%); max-height: 92vh; overflow-y: auto; transform: translateY(20px) scale(.98); transition: .3s; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.modal.open .modal__box { transform: none; }
.modal__box.sm { width: min(620px, 100%); }
.modal__close { position: absolute; top: .8rem; right: .8rem; z-index: 2; background: #fff; }

.pdp { display: grid; grid-template-columns: 1fr 1fr; }
.pdp__img { background: var(--bg-soft); }
.pdp__img img { width: 100%; height: 100%; object-fit: cover; min-height: 420px; border-radius: 18px 0 0 18px; }
.pdp__info { padding: 2.2rem; display: flex; flex-direction: column; gap: 1rem; }
.pdp__info h2 { font-family: var(--serif); font-size: 1.9rem; line-height: 1.15; }
.pdp__info .price strong { font-size: 1.5rem; }
.pdp__opt h4 { font-size: .85rem; margin-bottom: .5rem; display: flex; justify-content: space-between; }
.pdp__opt h4 a { color: var(--muted); text-decoration: underline; font-weight: 400; cursor: pointer; }
.color-opts { display: flex; gap: .5rem; }
.color-opt { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); transition: .15s; }
.color-opt.active { box-shadow: 0 0 0 2px var(--dark); }
.pdp__actions { display: flex; gap: .7rem; align-items: center; }
.pdp__actions .qty { margin: 0; }
.pdp__actions .qty button { width: 40px; height: 44px; }
.pdp__actions .btn--dark { flex: 1; }
.stock-note { font-size: .82rem; color: var(--success); }
.stock-note.low { color: var(--danger); }
.pdp__desc { color: var(--muted); font-size: .93rem; }
.pdp__meta { font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; display: grid; gap: .3rem; }

.checkout { padding: 2rem; }
.checkout h2 { font-family: var(--serif); margin-bottom: .3rem; }
.checkout .form { margin-top: 1.2rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.form label.lbl { font-size: .82rem; font-weight: 600; margin-bottom: -.5rem; }
.pay-opts { display: grid; gap: .5rem; }
.pay-opt { display: flex; gap: .7rem; align-items: center; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: .15s; }
.pay-opt:has(input:checked) { border-color: var(--dark); background: var(--bg-soft); }
.pay-opt input { accent-color: var(--dark); }
.pay-opt small { display: block; color: var(--muted); }
.summary { background: var(--bg-soft); border-radius: 12px; padding: 1rem 1.2rem; margin-top: .5rem; }
.summary .mini { display: flex; justify-content: space-between; font-size: .85rem; padding: .2rem 0; color: var(--muted); }
.summary .totals { margin: .6rem 0 0; }
.legal-check { display: flex; gap: .5rem; font-size: .85rem; align-items: flex-start; }
.legal-check input { margin-top: .25rem; accent-color: var(--dark); }

.success { text-align: center; padding: 3rem 2rem; }
.success .check { width: 80px; height: 80px; border-radius: 50%; background: var(--success); color: #fff; font-size: 2.4rem; display: grid; place-items: center; margin: 0 auto 1.2rem; animation: pop .5s; }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.15); } }
.success h2 { font-family: var(--serif); margin-bottom: .5rem; }
.success .order-no { display: inline-block; background: var(--bg-soft); padding: .5rem 1rem; border-radius: 8px; font-weight: 700; margin: 1rem 0; letter-spacing: 1px; }
.success .btns { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }

.legal { padding: 2rem; }
.legal h2 { font-family: var(--serif); margin-bottom: 1rem; }
.legal h4 { margin: 1rem 0 .3rem; }
.legal p, .legal li { color: var(--muted); font-size: .93rem; }
.legal ul { padding-left: 1.2rem; }
.size-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: .9rem; }
.size-table th, .size-table td { border: 1px solid var(--line); padding: .55rem; text-align: center; }
.size-table th { background: var(--bg-soft); }

.order-card { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; margin-bottom: .9rem; font-size: .88rem; }
.order-card header { display: flex; justify-content: space-between; margin-bottom: .4rem; }
.order-card .status { background: #fff3e0; color: #b26a00; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }

/* ---------- Adaptaciones al catálogo de la tienda ---------- */
.nav__cats { display: contents; }
.hero { min-height: 62vh; }
.categories { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cat-card img { object-fit: contain; padding: 1.2rem 1.2rem 3.5rem; }
.cat-card small { position: absolute; left: 1.4rem; bottom: .6rem; z-index: 1; color: #f3e9df; font-size: .8rem; }
.color-filters { display: flex; flex-wrap: wrap; gap: .45rem; }
.color-filters button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.color-filters button.active { box-shadow: 0 0 0 2px var(--dark); }
.card__badge.card__badge--pocas { background: #b26a00; color: #fff; }
.card__badge.card__badge--agotado { background: #777; color: #fff; }
.price small { color: var(--muted); font-size: .8rem; }
.card__media img { object-fit: contain; background: var(--bg-soft); }
.pdp__img { padding: 1rem; display: flex; flex-direction: column; gap: .7rem; border-radius: 18px 0 0 18px; }
.pdp__img .main { flex: 1; display: grid; place-items: center; background: #fff; border-radius: 14px; overflow: hidden; min-height: 420px; }
.pdp__img .main img { width: 100%; height: 100%; max-height: 560px; object-fit: contain; min-height: 0; border-radius: 0; }
.pdp-thumbs { display: flex; gap: .5rem; overflow-x: auto; }
.pdp-thumbs button { width: 62px; height: 76px; flex-shrink: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: #fff; }
.pdp-thumbs button.active { border-color: var(--dark); }
.pdp-thumbs img { width: 100%; height: 100%; object-fit: cover; min-height: 0; border-radius: 0; }
.pdp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 720px) { .pdp { grid-template-columns: minmax(0, 1fr); } }
.line-item img { object-fit: contain; }
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 80; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: var(--shadow); transition: .2s; }
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 30px; height: 30px; }
body.lock .wa-float { display: none; }
/* Paneles cerrados: sin sombra asomando en el borde de la pantalla */
.drawer:not(.open), .nav:not(.open), .filters:not(.open) { box-shadow: none; }
@media (max-width: 460px) { .pdp__actions { flex-wrap: wrap; } .pdp__actions .btn--dark { order: 3; flex-basis: 100%; } }
.form .pay-opt input, .form .legal-check input { width: auto; padding: 0; flex: none; }
.form select { width: 100%; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: .5rem; width: max-content; max-width: 92vw; }
.toast { background: var(--dark); color: #fff; padding: .85rem 1.3rem; border-radius: 12px; font-size: .9rem; box-shadow: var(--shadow); animation: toastIn .3s; display: flex; gap: .6rem; align-items: center; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }
.toast.out { animation: toastOut .3s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(15px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(15px); } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .nav { position: fixed; top: 0; left: 0; height: 100%; width: min(300px, 82%); background: #fff; flex-direction: column; gap: 0; padding: 5rem 1.6rem 2rem; z-index: 100; transform: translateX(-100%); transition: transform .35s; box-shadow: 10px 0 40px rgba(0,0,0,.12); margin: 0; }
  .nav.open { transform: none; }
  .nav a { padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .burger { display: grid; }
  .header__inner { gap: .5rem; }
  .logo { margin-right: auto; }
  .shop { grid-template-columns: 1fr; }
  .filters { position: fixed; top: 0; left: 0; height: 100%; width: min(320px, 86%); background: #fff; z-index: 100; padding: 1.4rem; overflow-y: auto; transform: translateX(-100%); transition: transform .35s; }
  .filters.open { transform: none; }
  .filters__close, .filters-toggle { display: inline-flex; }
  .perks__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .categories { grid-template-columns: 1fr 1fr; }
  .categories .cat-card:last-child { grid-column: span 2; aspect-ratio: 16/9; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 1.4rem .9rem; }
  .card__quick { opacity: 1; transform: none; padding: .55rem; font-size: .78rem; }
  .pdp { grid-template-columns: 1fr; }
  .pdp__img { border-radius: 18px 18px 0 0; }
  .pdp__img .main { min-height: 300px; }
  .pdp__img .main img { max-height: 420px; }
  .pdp__info { padding: 1.4rem; }
  .contact { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .checkout { padding: 1.4rem; }
  .hero { min-height: 65vh; }
  .toolbar { flex-wrap: wrap; }
}
@media (max-width: 460px) {
  .perks__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .header__actions .icon-btn { width: 38px; }
  #ordersBtn { display: none; }
  .newsletter { flex-direction: column; }
}


/* Compatibilidad táctil y paneles móviles */
.nav__close, .nav__orders { display: none; }
.card__open { display: block; width: 100%; height: 100%; }
.card__badge { pointer-events: none; }
.card__name button { text-align: left; }
.legal__back { margin-top: 1.5rem; }
:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 3px; }
@media (hover: none) {
  .card:hover .card__media img { transform: none; }
  .card__quick { opacity: 1; transform: none; }
}
@media (max-width: 1024px) {
  .nav { height: 100%; height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
    padding-top: max(4.5rem, env(safe-area-inset-top)); padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
  .nav__close { display: grid; position: absolute; top: max(.8rem, env(safe-area-inset-top)); right: .8rem; }
  .nav__orders { display: block; padding: .9rem 0; text-align: left; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .header__inner .logo { min-width: 0; font-size: clamp(1rem, 3.5vw, 1.4rem); line-height: 1.2; overflow-wrap: anywhere; }
  .burger, .header__actions { flex-shrink: 0; }
  .header__actions .icon-btn { width: 42px; height: 44px; }
  .drawer, .filters { height: 100%; height: 100dvh; }
  .drawer__body { min-height: 0; overscroll-behavior: contain; }
  .drawer__foot { padding-bottom: max(1.2rem, env(safe-area-inset-bottom)); }
  .modal__box { max-height: 92vh; max-height: calc(100dvh - 2rem); }
}
