[hidden] { display: none !important; }
:root {
  --bg: #FFF9F2;
  --sand: #FBEBDD;
  --card: #FFFFFF;
  --ink: #2B211C;
  --ink-soft: #6E5A4E;
  --line: #EEDFD1;
  --brand: #E2683C;
  --brand-dark: #C2522A;
  --teal: #1F6F6B;
  --teal-dark: #17544F;
  --gold: #F5B841;
  --wa: #1FA855;
  --radius: 18px;
  --shadow: 0 10px 30px -14px rgba(90, 50, 25, .28);
  --head: "Fredoka", system-ui, sans-serif;
  --body: "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; margin: 0 0 .5em; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--teal); }
.small { font-size: .85rem; }
.muted { color: var(--ink-soft); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; border: 0; border-radius: 999px; padding: .8em 1.4em; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -6px rgba(226, 104, 60, .6); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--teal); border: 2px solid var(--teal); }
.btn-ghost:hover { background: var(--teal); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { filter: brightness(.94); }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--teal); font-weight: 700; text-decoration: underline; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Barra superior ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1rem; padding: .7rem clamp(16px, 4vw, 48px); background: rgba(255, 249, 242, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-family: var(--head); font-size: 1.45rem; font-weight: 600; }
.brand b { color: var(--brand); font-weight: 700; }
.nav { display: flex; gap: 1.4rem; margin-left: auto; }
.nav a { color: var(--ink-soft); text-decoration: none; font-weight: 700; }
.nav a:hover { color: var(--brand); }
.cart-btn { display: inline-flex; align-items: center; gap: .5rem; border: 0; border-radius: 999px; background: var(--teal); color: #fff; padding: .6em 1.1em; font-weight: 800; cursor: pointer; }
.cart-btn:hover { background: var(--teal-dark); }
.badge { min-width: 1.5em; height: 1.5em; padding: 0 .4em; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.badge.bump { animation: bump .4s; }
@keyframes bump { 50% { transform: scale(1.4); } }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2rem; align-items: center; padding: clamp(28px, 6vw, 72px) clamp(16px, 4vw, 48px); max-width: 1240px; margin: 0 auto; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-weight: 800; font-size: .78rem; color: var(--teal); margin: 0 0 .8rem; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 700; }
.hero h1 span { color: var(--brand); }
.hero-text > p { font-size: 1.1rem; color: var(--ink-soft); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.4rem 0; }
.hero-facts { display: flex; gap: 1.6rem; list-style: none; padding: 0; margin: 0; color: var(--ink-soft); font-weight: 700; }
.hero-facts b { display: block; font-family: var(--head); font-size: 1.6rem; color: var(--ink); }
.hero-art { position: relative; aspect-ratio: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-art img:first-child { grid-row: span 2; }
.hero-art.logo-only { display: block; background: var(--sand); border-radius: 50%; padding: 12%; }

/* ---------- Secciones ---------- */
.section { max-width: 1240px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 48px); }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
#search { padding: .7em 1.1em; border: 2px solid var(--line); border-radius: 999px; background: #fff; min-width: min(320px, 100%); }
#search:focus { border-color: var(--teal); outline: none; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.chip { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: .45em 1.1em; font-weight: 700; cursor: pointer; color: var(--ink-soft); }
.chip.active, .chip:hover { border-color: var(--teal); background: var(--teal); color: #fff; }
.cm-filter { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; background: #E6F2F1; color: var(--teal-dark); border-radius: 12px; padding: .7em 1em; margin-bottom: 1.2rem; font-weight: 700; }

/* ---------- Tarjetas ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.4rem; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; cursor: pointer; transition: transform .2s, box-shadow .2s; border: 0; padding: 0; text-align: left; }
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -16px rgba(90, 50, 25, .4); }
.card-img { aspect-ratio: 4 / 3; background: var(--sand); position: relative; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-img img { transform: scale(1.05); }
.card-tag { position: absolute; top: 10px; left: 10px; background: rgba(255, 255, 255, .92); color: var(--teal-dark); font-weight: 800; font-size: .75rem; padding: .25em .7em; border-radius: 999px; }
.card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card-body h3 { font-size: 1.25rem; margin: 0; }
.card-body p { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.card-sizes { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .2rem; }
.card-sizes span { font-size: .75rem; font-weight: 800; padding: .15em .55em; border-radius: 6px; background: var(--sand); color: var(--ink-soft); }
.card-sizes span.fit { background: var(--teal); color: #fff; }
.card-dots { display: flex; gap: 4px; margin-top: auto; padding-top: .6rem; align-items: center; }
.card-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); margin-left: -4px; }
.card-dots i:first-child { margin-left: 0; }
.card-dots small { margin-left: .5rem; color: var(--ink-soft); font-weight: 700; }
.card-cta { margin-top: .6rem; color: var(--brand); font-weight: 800; }
.empty { color: var(--ink-soft); text-align: center; padding: 2rem 0; }

/* Imagen faltante: muestra el logo en vez de un ícono roto */
.img-fallback { object-fit: contain !important; padding: 18%; background: var(--sand); }

/* ---------- Guía ---------- */
.guide-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; margin-bottom: 1.6rem; }
.guide-steps, .finder { background: #fff; border-radius: var(--radius); padding: 1.4rem 1.6rem; box-shadow: var(--shadow); }
.guide-steps ol { padding-left: 1.2rem; margin: 0 0 1rem; }
.guide-steps li { margin-bottom: .5rem; }
.guide-dog { width: 100%; max-width: 320px; }
.finder label { font-weight: 700; display: block; margin-bottom: .4rem; }
.finder-row { display: flex; gap: .6rem; }
.finder-row input { flex: 1; min-width: 0; padding: .7em 1em; border: 2px solid var(--line); border-radius: 12px; font-size: 1.1rem; }
.finder-row input:focus { border-color: var(--teal); outline: none; }
.finder-result { margin-top: 1rem; color: var(--ink-soft); }
.finder-result ul { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .4rem; }
.finder-result li { display: flex; justify-content: space-between; gap: .6rem; padding: .55em .8em; border-radius: 10px; background: var(--sand); color: var(--ink); }
.finder-result li b { color: var(--teal-dark); }
.finder-result li button { margin-left: auto; }
.finder-result .ok { color: var(--teal-dark); font-weight: 800; }

.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.size-table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
.size-table caption { text-align: left; padding: 1rem 1.2rem .4rem; font-weight: 800; font-family: var(--head); font-size: 1.1rem; }
.size-table th, .size-table td { padding: .65em 1em; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.size-table th:first-child, .size-table td:first-child { text-align: left; }
.size-table thead th { background: var(--sand); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.size-table td.hit { background: var(--teal); color: #fff; font-weight: 800; }
.size-table td.na { color: #cbb9aa; }

/* ---------- Cómo ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.steps li { background: #fff; border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.steps span { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--brand); color: #fff; font: 700 1.2rem var(--head); margin-bottom: .6rem; }
.steps p { margin: 0; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 2.4rem 1rem 6rem; border-top: 1px solid var(--line); color: var(--ink-soft); }
.footer .brand { justify-content: center; margin-bottom: .6rem; }
.footer-links { display: flex; gap: 1.2rem; justify-content: center; }

/* ---------- Botón flotante ---------- */
.quote-float { position: fixed; right: 18px; bottom: 18px; z-index: 25; display: inline-flex; align-items: center; gap: .5rem; border: 0; border-radius: 999px; background: var(--wa); color: #fff; padding: .85em 1.3em; font-weight: 800; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .35); cursor: pointer; }
.quote-float:hover { filter: brightness(.94); }

/* ---------- Modal producto ---------- */
.modal { border: 0; border-radius: 24px; padding: 0; width: min(1000px, calc(100vw - 24px)); max-height: calc(100vh - 24px); background: var(--bg); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); }
.modal::backdrop, .zoom::backdrop { background: rgba(43, 33, 28, .55); backdrop-filter: blur(3px); }
.modal-close { position: absolute; top: 10px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
.pm { display: grid; grid-template-columns: 1.05fr 1fr; }
.pm-gallery { background: var(--sand); padding: 1rem; display: flex; flex-direction: column; gap: .7rem; }
.pm-tabs { max-width: calc(100% - 48px); display: flex; gap: .4rem; background: rgba(255, 255, 255, .6); padding: 4px; border-radius: 999px; align-self: flex-start; }
.pm-tabs button { border: 0; background: none; border-radius: 999px; padding: .4em 1em; font-weight: 800; color: var(--ink-soft); cursor: pointer; }
.pm-tabs button.active { background: #fff; color: var(--teal-dark); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.pm-main { position: relative; border-radius: 16px; overflow: hidden; background: #fff; aspect-ratio: 1; cursor: zoom-in; }
.pm-main img { width: 100%; height: 100%; object-fit: contain; }
.pm-hint { position: absolute; left: 10px; right: 10px; bottom: 10px; margin: 0; background: rgba(31, 111, 107, .92); color: #fff; font-size: .82rem; font-weight: 700; padding: .45em .8em; border-radius: 10px; }
.pm-info { padding: 1.6rem 1.6rem 1.4rem; overflow-y: auto; max-height: calc(100vh - 24px); }
.pm-cat { margin: 0 0 .3rem; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 800; color: var(--teal); }
.pm-info h2 { font-size: 1.9rem; margin-bottom: .2rem; padding-right: 2.4rem; }
.pm-sub { margin: 0 0 .6rem; font-weight: 700; color: var(--brand-dark); }
.pm-desc { color: var(--ink-soft); font-size: .95rem; }
.field { margin: 1rem 0; }
.field.row { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.field-label { display: block; font-weight: 800; margin-bottom: .45rem; }
.field-label small { font-weight: 600; color: var(--ink-soft); }
.opts { display: flex; flex-wrap: wrap; gap: .45rem; }
.opt { min-width: 52px; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: .45em .8em; font-weight: 800; cursor: pointer; line-height: 1.2; }
.opt small { display: block; font-weight: 600; font-size: .72rem; color: var(--ink-soft); }
.opt.active { border-color: var(--teal); background: var(--teal); color: #fff; }
.opt.active small { color: #d9efed; }
.pm-measure { margin: .5rem 0 0; font-size: .9rem; color: var(--teal-dark); font-weight: 700; }
.swatches { display: flex; flex-wrap: wrap; gap: .45rem; }
.sw { position: relative; width: 44px; height: 44px; border-radius: 12px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; overflow: hidden; display: grid; grid-template-rows: 2fr 1fr; }
.sw i { display: block; }
.sw b { position: absolute; inset: auto 0 0 0; font-size: .7rem; background: rgba(255, 255, 255, .88); color: var(--ink); line-height: 1.4; }
.sw.active { box-shadow: 0 0 0 3px var(--brand); transform: translateY(-2px); }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.qty button { width: 40px; height: 42px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; }
.qty input { width: 46px; text-align: center; border: 0; font-weight: 800; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.note { flex: 1; min-width: 180px; font-weight: 800; font-size: .9rem; }
.note input { display: block; width: 100%; margin-top: .45rem; padding: .6em .8em; border: 2px solid var(--line); border-radius: 12px; font-weight: 600; }

/* ---------- Zoom ---------- */
.zoom { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
.zoom img { max-width: 96vw; max-height: 92vh; border-radius: 14px; }

/* ---------- Drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(43, 33, 28, .45); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--bg); z-index: 41; transform: translateX(100%); transition: transform .3s ease; display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0, 0, 0, .2); }
.drawer.open { transform: none; }
.drawer-head { position: relative; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.4rem 1.4rem; }
.cart-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: .8rem; align-items: center; background: #fff; border-radius: 14px; padding: .6rem; box-shadow: 0 4px 14px -8px rgba(90, 50, 25, .3); }
.cart-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: var(--sand); }
.cart-item h4 { margin: 0; font-size: .98rem; }
.cart-item p { margin: 0; font-size: .82rem; color: var(--ink-soft); }
.cart-item .ci-actions { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.cart-item .qty button { width: 28px; height: 30px; font-size: 1rem; }
.cart-item .qty input { width: 30px; font-size: .9rem; }
.ci-remove { border: 0; background: none; color: var(--brand-dark); font-size: .8rem; font-weight: 700; cursor: pointer; }
.empty-cart { text-align: center; color: var(--ink-soft); padding: 2rem 0; }
.empty-cart img { margin: 0 auto 1rem; opacity: .9; }
.quote-form { display: grid; gap: .8rem; margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px dashed var(--line); }
.quote-form label { font-weight: 800; font-size: .9rem; }
.quote-form input, .quote-form textarea { display: block; width: 100%; margin-top: .3rem; padding: .65em .8em; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-weight: 600; }
.quote-form input:focus, .quote-form textarea:focus { border-color: var(--teal); outline: none; }
.quote-form .btn-link { justify-self: center; font-size: .85rem; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: .7em 1.2em; border-radius: 999px; font-weight: 700; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 460px; width: 100%; margin: 0 auto; }
  .guide-wrap { grid-template-columns: 1fr; }
  .pm { grid-template-columns: 1fr; }
  .pm-info { max-height: none; }
  .modal { overflow-y: auto; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .cart-btn { margin-left: auto; }
  .cart-label { display: none; }
  .steps { grid-template-columns: 1fr; }
  .brand { font-size: 1.25rem; }
  .hero-facts { gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
