/* Tráelo RD — tienda moderna. Todos los colores salen de variables que se editan en Apariencia. */
:root {
  --hero: #0B1F3A; --hero-text: #FFFFFF;
  --ink: #FF6A3D; --ink-2: #E85A2F; --on-ink: #FFFFFF;
  --signal: #FFC83D; --on-signal: #1A1300;
  --kraft: #FF6A3D;
  --fog: #F2F3F5; --paper: #FFFFFF; --line: #E3E5E8;
  --text: #0F172A; --muted: #5B6474; --ok: #0E8A4F;
  --radius-l: 16px; --radius-s: 10px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif; --font-head: var(--font);
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-hover: 0 2px 4px rgba(15, 23, 42, .08), 0 16px 36px rgba(15, 23, 42, .12);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--fog); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--hero); color: var(--hero-text); }
.bar { display: flex; align-items: center; gap: 20px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--hero-text); flex: none; font-family: var(--font-head); }
.brand img { display: block; width: auto; max-width: 200px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.brand-text small { font-size: 12px; opacity: .72; margin-top: 3px; }
.hsearch { flex: 1; display: flex; height: 46px; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 0 0 2px transparent; transition: box-shadow .15s; }
.hsearch:focus-within { box-shadow: 0 0 0 3px var(--signal); }
.hsearch select { border: 0; background: #EEF0F3; color: #333; padding: 0 10px; font-size: 13px; max-width: 120px; cursor: pointer; border-right: 1px solid #DDE0E4; }
.hsearch input { flex: 1; min-width: 0; border: 0; padding: 0 14px; font-size: 16px; color: #111; outline: none; }
.hsearch button { border: 0; background: var(--signal); color: var(--on-signal); width: 56px; display: grid; place-items: center; cursor: pointer; }
.hsearch button:hover { filter: brightness(.95); }
.hsearch svg { width: 22px; height: 22px; }
.hnav { display: flex; gap: 4px; flex: none; }
.hnav a { color: var(--hero-text); text-decoration: none; font-size: 14px; font-weight: 600; padding: 9px 12px; border-radius: 10px; white-space: nowrap; }
.hnav a:hover { background: color-mix(in srgb, var(--hero-text) 12%, transparent); }
.subnav { background: color-mix(in srgb, var(--hero) 82%, #FFFFFF); }
.subnav .wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.subnav .wrap::-webkit-scrollbar { display: none; }
.subnav a { flex: none; color: var(--hero-text); text-decoration: none; font-size: 14px; padding: 9px 12px; display: inline-flex; align-items: center; gap: 7px; border-bottom: 2px solid transparent; opacity: .9; }
.subnav a:hover, .subnav a.on { opacity: 1; border-bottom-color: var(--signal); }
.subnav .dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255,255,255,.6); }
@media (max-width: 760px) {
  .bar { flex-wrap: wrap; gap: 10px 12px; padding-top: 10px; padding-bottom: 10px; }
  .hsearch { order: 3; flex-basis: 100%; height: 44px; }
  .hsearch select { max-width: 92px; font-size: 12px; }
  .hnav { margin-left: auto; }
  .hnav a { font-size: 13px; padding: 7px 9px; }
  .brand-text b { font-size: 19px; }
  .brand-text small { display: none; }
}

/* ---------- banners ---------- */
.heroes { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius-l); margin-top: 20px; }
.heroes::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .heroes.many { grid-auto-columns: calc(50% - 8px); gap: 16px; border-radius: 0; } }
.hb { scroll-snap-align: start; position: relative; min-height: 210px; border-radius: var(--radius-l); padding: 28px 30px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; text-decoration: none; overflow: hidden; background-size: cover; background-position: center; }
.hb.has-img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.6), rgba(0,0,0,.05) 70%); }
.hb > * { position: relative; }
.hb h2 { font-family: var(--font-head); font-size: clamp(26px, 3.6vw, 40px); line-height: 1.05; margin: 0; font-weight: 800; letter-spacing: -.02em; max-width: 16ch; }
.hb p { margin: 0; font-size: 16px; opacity: .9; max-width: 42ch; }
.hb .code { align-self: flex-start; font-weight: 700; font-size: 14px; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.18); backdrop-filter: blur(4px); }
.hb .cta { align-self: flex-start; margin-top: 6px; font-weight: 700; font-size: 14px; padding: 9px 16px; border-radius: 999px; background: #fff; color: #111; }
.hero-plain { margin-top: 20px; border-radius: var(--radius-l); background: var(--hero); color: var(--hero-text); padding: 32px 30px; display: grid; gap: 14px; }
.hero-plain h1 { font-family: var(--font-head); margin: 0; font-size: clamp(28px, 4vw, 46px); line-height: 1.05; letter-spacing: -.02em; max-width: 18ch; }
.hero-plain p { margin: 0; opacity: .85; max-width: 52ch; }

.quick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 16px 0 4px; font-size: 14px; color: var(--muted); }
.quick a { text-decoration: none; color: var(--text); background: var(--paper); border: 1px solid var(--line); padding: 6px 13px; border-radius: 999px; font-weight: 500; }
.quick a:hover { border-color: var(--text); }
.quick a.link { background: transparent; border: 0; color: var(--ink); font-weight: 700; padding: 6px 4px; }

/* ---------- secciones ---------- */
.sec { margin: 30px 0 8px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { font-family: var(--font-head); font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin: 0; display: flex; align-items: center; gap: 10px; }
.sec-head h2 .dot { width: 12px; height: 12px; border-radius: 50%; }
.sec-head a { font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.sec-head a:hover { text-decoration: underline; }
.sec-note { color: var(--muted); font-size: 14px; margin: -8px 0 14px; }
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: 190px; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x proximity; scrollbar-width: thin; }
@media (min-width: 900px) { .shelf { grid-auto-columns: 220px; } }
.shelf > * { scroll-snap-align: start; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chips a { font-size: 14px; text-decoration: none; padding: 6px 13px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--text); }
.chips a.on { background: var(--text); color: var(--paper); border-color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; padding-bottom: 36px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 18px; } }
body.dense .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
body.dense .shelf { grid-auto-columns: 165px; }
body.roomy .grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
body.roomy .shelf { grid-auto-columns: 250px; }

/* ---------- tarjeta de producto ---------- */
.pcard { background: var(--paper); border-radius: var(--radius-l); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .18s, transform .18s; }
@media (hover: hover) { .pcard:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); } }
.pimg { position: relative; aspect-ratio: 1; background: #fff; display: grid; place-items: center; padding: 14px; border-bottom: 1px solid var(--line); }
.pimg img { width: 100%; height: 100%; object-fit: contain; }
.pimg .noimg { font-family: var(--font-head); font-weight: 800; font-size: 30px; color: var(--line); }
.off { position: absolute; left: 10px; top: 10px; background: #D92D20; color: #fff; font-weight: 800; font-size: 12px; padding: 3px 8px; border-radius: 6px; }
.pbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pstore { font-size: 12px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pstore .dot { width: 8px; height: 8px; border-radius: 50%; }
.ptitle { font-size: 14.5px; line-height: 1.35; color: var(--text); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.ptitle:hover { color: var(--ink); }
.pprice { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.amt { font-family: var(--font-head); font-weight: 800; color: var(--text); display: inline-flex; align-items: flex-start; line-height: 1; letter-spacing: -.02em; }
.amt small { font-size: 13px; margin-top: 3px; margin-right: 1px; }
.amt b { font-size: 26px; }
.amt sup { font-size: 13px; margin-top: 3px; margin-left: 1px; }
.pprice s { color: var(--muted); font-size: 13px; align-self: flex-end; }
.pprice .na { font-size: 14px; color: var(--muted); }
.badge { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.badge.drop { background: color-mix(in srgb, var(--ok) 12%, #fff); color: var(--ok); }
.badge.hot { background: color-mix(in srgb, var(--signal) 28%, #fff); color: var(--text); }
.newuser { font-size: 12.5px; color: var(--ok); font-weight: 600; }
.coupon { align-self: flex-start; font-size: 12.5px; font-weight: 700; border: 1.5px dashed var(--ink); background: color-mix(in srgb, var(--ink) 7%, #fff); color: var(--text); border-radius: 8px; padding: 3px 9px; cursor: pointer; }
.ship { display: flex; align-items: center; gap: 8px; background: var(--fog); border-radius: 10px; padding: 7px 10px; font-size: 12.5px; color: var(--muted); }
.ship svg { width: 18px; height: 18px; flex: none; color: var(--text); }
.ship span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ship b { color: var(--text); font-size: 14.5px; }
.ship .lb { margin-left: auto; font-weight: 700; color: var(--text); background: var(--paper); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.pactions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; font-weight: 700; font-size: 14px; padding: 10px 14px; border-radius: 999px; text-decoration: none; border: 0; cursor: pointer; transition: background .15s; }
.btn-go { flex: 1; min-width: 0; background: var(--ink); color: var(--on-ink); }
.pactions .btn-go { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; padding: 11px 12px; font-size: 13.5px; }
.btn-go:hover { background: var(--ink-2); }
.btn-ghost { background: var(--paper); color: var(--text); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--text); }
.btn-wa { width: 40px; height: 40px; padding: 0; flex: none; background: #E8F7EE; color: #128C4A; }
.btn-wa:hover { background: #D3F0DE; }
.btn-wa svg { width: 20px; height: 20px; }

/* ---------- búsqueda ---------- */
.results-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin: 24px 0 14px; }
.results-head h1 { font-family: var(--font-head); font-size: 26px; margin: 0; letter-spacing: -.01em; }
.results-head p { margin: 2px 0 0; color: var(--muted); }
.seg { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg a { font-size: 13px; text-decoration: none; padding: 6px 12px; border-radius: 999px; color: var(--muted); font-weight: 600; }
.seg a.on { background: var(--text); color: var(--paper); }
.panel { background: var(--paper); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 20px; margin: 10px 0 24px; }
.panel h2 { font-family: var(--font-head); font-size: 19px; margin: 0 0 6px; }
.panel > p { margin: 0 0 12px; color: var(--muted); }
.store-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.store-btns a { padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 14px; }
.form-row { display: grid; gap: 10px; max-width: 520px; }
.form-row input[type=tel], .form-row input[type=text], .form-row input[type=number], .form-row input[type=url] { font-size: 15px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; width: 100%; background: #fff; }
.check-line { display: flex; gap: 8px; font-size: 13px; color: var(--muted); align-items: flex-start; }
.ok-msg { color: var(--ok); font-weight: 700; }
.err-msg { color: #B42318; font-weight: 700; }
.empty { text-align: center; padding: 40px 20px; }
.empty h2 { margin-bottom: 4px; }

/* ---------- página de producto ---------- */
.crumbs { font-size: 13px; color: var(--muted); margin: 18px 0 10px; }
.crumbs a { color: var(--muted); }
.pdp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-bottom: 28px; }
@media (min-width: 920px) { .pdp { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; } .buybox { position: sticky; top: 130px; } }
.gallery { background: #fff; border-radius: var(--radius-l); box-shadow: var(--shadow); aspect-ratio: 1; display: grid; place-items: center; padding: 28px; }
.gallery img { width: 100%; height: 100%; object-fit: contain; }
.buybox { background: var(--paper); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 24px; display: grid; gap: 12px; }
.buybox h1 { font-family: var(--font-head); font-size: clamp(21px, 2.6vw, 28px); line-height: 1.2; margin: 0; letter-spacing: -.01em; }
.buybox .amt b { font-size: 38px; }
.buybox .amt small, .buybox .amt sup { font-size: 17px; margin-top: 5px; }
.calc { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.calc table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.calc td { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.calc td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.calc tr.total td { background: var(--hero); color: var(--hero-text); font-weight: 800; font-size: 17px; border: 0; }
.calc input { width: 96px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; text-align: right; font-weight: 600; }
.note { font-size: 13px; color: var(--muted); margin: 0; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.row-btns .btn { flex: 1; }
.spark { width: 100%; height: 70px; }

/* ---------- páginas de texto ---------- */
.prose { background: var(--paper); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 28px; margin: 24px 0 40px; max-width: 780px; }
.prose h1 { font-family: var(--font-head); margin-top: 0; font-size: 30px; letter-spacing: -.01em; }
.prose ol { padding-left: 22px; }
.prose li { margin-bottom: 10px; }
.addr { background: var(--fog); border-left: 4px solid var(--ink); padding: 12px 14px; white-space: pre-line; border-radius: 0; }

footer { background: var(--hero); color: var(--hero-text); font-size: 13px; padding: 26px 0 44px; margin-top: 30px; }
footer p { opacity: .8; max-width: 90ch; }
footer a { color: var(--hero-text); }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--text); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 99; }
.toast.show { opacity: 1; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 760px) {
  .quick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -20px; margin-right: -20px; padding: 0 20px; }
  .quick::-webkit-scrollbar { display: none; }
  .quick a, .quick { white-space: nowrap; }
  .hb { min-height: 180px; padding: 22px; }
}
@media (max-width: 760px) {
  .bar { flex-wrap: wrap; }
  .brand-text b { font-size: 17px; letter-spacing: -.02em; }
  .hnav { gap: 0; }
  .hnav a { font-size: 12.5px; padding: 6px 7px; }
}
@media (max-width: 430px) { .hnav a:first-child { display: none; } }
