/* Tienda — sistema visual. Tokens de marca en /theme.css (--brand-*); ver docs/DISENO.md */

:root {
  --c-ink: var(--brand-ink, #0f172a);
  --c-deep: var(--brand-primary, #1f2937);
  --c-deep-2: var(--brand-primary-dark, #111827);
  --c-action: var(--brand-accent, #2563eb);
  --c-water: var(--brand-water, var(--brand-accent, #2563eb));
  --c-surface: var(--brand-surface, #f8fafc);
  --c-tint: var(--brand-accent-soft, #e0ecfa);
  --c-white: #fff;
  --c-line: #d6e0ea;
  --c-muted: #4a5a70;
  --c-sun: #f2b705;
  --c-ok: #0e7a4f;
  --c-warn: #8a5a00;
  --c-bad: #b42318;

  --f-head: var(--brand-font-heading, system-ui, sans-serif);
  --f-body: var(--brand-font-body, system-ui, sans-serif);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --r-sm: 6px; --r-md: 10px; --r-pill: 999px;
  --wrap: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--c-surface); color: var(--c-ink);
  font-family: var(--f-body); font-size: 1rem; line-height: 1.55;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--c-action); text-underline-offset: 3px; }
a:hover { color: var(--c-deep); }
h1, h2, h3 { font-family: var(--f-head); color: var(--c-deep); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 var(--s3); }
h1 { font-size: clamp(1.9rem, 4vw, 2.45rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3vw, 1.95rem); font-weight: 600; }
h3, .h3 { font-size: 1.25rem; font-weight: 600; }
h2.h3 { margin-top: var(--s5); }
p { margin: 0 0 var(--s3); }
:focus-visible { outline: 3px solid var(--c-action); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--s4); top: -60px; background: var(--c-deep); color: #fff; padding: var(--s2) var(--s4); border-radius: var(--r-sm); z-index: 50; }
.skip:focus { top: var(--s2); color: #fff; }
.icon { width: 20px; height: 20px; flex: none; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s4); }
@media (min-width: 768px) { .wrap { padding: 0 var(--s6); } }
.muted { color: var(--c-muted); }

/* ── Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 46px; padding: 0 var(--s5); border-radius: var(--r-md); border: 2px solid transparent;
  font: 700 1rem/1 var(--f-body); text-decoration: none; cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.btn--primary { background: var(--c-action); color: #fff; }
.btn--primary:hover { background: var(--c-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--c-action); border-color: var(--c-action); }
.btn--ghost:hover { background: var(--c-tint); color: var(--c-deep); }
.btn--light { background: #fff; color: var(--c-deep); }
.btn--light:hover { background: var(--c-tint); color: var(--c-deep); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { background: #c7d2de; color: #4a5a70; border-color: #c7d2de; cursor: not-allowed; }
.btn--link { background: none; border: 0; padding: 0; min-height: 0; color: var(--c-action); text-decoration: underline; font-weight: 600; }

/* ── Encabezado */
.site-header { background: #fff; border-bottom: 1px solid var(--c-line); position: sticky; top: 0; z-index: 20; }
.site-header__bar { display: flex; align-items: center; gap: var(--s4); min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: var(--s2); text-decoration: none; color: var(--c-deep); margin-right: auto; }
.brand__mark { width: 40px; height: 40px; }
.brand__name { font: 700 1.15rem/1 var(--f-head); letter-spacing: -0.02em; }
.nav { display: none; width: 100%; order: 5; flex-direction: column; padding-bottom: var(--s3); }
.nav.is-open { display: flex; }
.nav a { padding: var(--s3) 0; color: var(--c-ink); text-decoration: none; font-weight: 600; border-top: 1px solid var(--c-line); }
.nav a:hover { color: var(--c-action); }
.search { display: flex; order: 6; width: 100%; padding-bottom: var(--s3); }
.search input {
  flex: 1; min-width: 0; height: 44px; border: 1px solid var(--c-line); border-right: 0;
  border-radius: var(--r-md) 0 0 var(--r-md); padding: 0 var(--s3); font: inherit; background: var(--c-surface);
}
.search button { width: 48px; border: 0; background: var(--c-deep); color: #fff; border-radius: 0 var(--r-md) var(--r-md) 0; cursor: pointer; }
.search button .icon { margin: 0 auto; }
.site-header__tools { display: flex; align-items: center; gap: var(--s2); }
.lang { display: flex; border: 1px solid var(--c-line); border-radius: var(--r-pill); overflow: hidden; }
.lang__item { padding: 6px 10px; font-size: .8125rem; font-weight: 700; text-decoration: none; color: var(--c-muted); min-width: 40px; text-align: center; }
.lang__item.is-current { background: var(--c-deep); color: #fff; }
.cart-link { position: relative; display: grid; place-items: center; width: 44px; height: 44px; color: var(--c-deep); border-radius: var(--r-md); }
.cart-link:hover { background: var(--c-tint); }
.cart-link__count {
  position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-pill);
  background: var(--c-action); color: #fff; font-size: .75rem; font-weight: 700; display: grid; place-items: center;
}
.menu-toggle { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--c-deep); cursor: pointer; border-radius: var(--r-md); }
@media (max-width: 479px) {
  .site-header__bar { gap: var(--s2); }
  .site-header__tools { gap: 2px; }
  .brand__mark { width: 34px; height: 34px; }
  .brand__name { font-size: 1rem; }
  .lang__item { min-width: 32px; padding: 6px 7px; }
  .menu-toggle, .cart-link { width: 40px; }
}
@media (min-width: 1024px) {
  .site-header__bar { flex-wrap: nowrap; }
  .brand { margin-right: 0; }
  .nav, .nav.is-open { display: flex; flex-direction: row; width: auto; order: 0; padding: 0; gap: var(--s5); }
  .nav a { border: 0; padding: var(--s2) 0; }
  .search { order: 0; width: auto; flex: 1; max-width: 380px; padding: 0; margin-left: auto; }
  .menu-toggle { display: none; }
}

/* ── Avisos */
.flash-wrap { padding-top: var(--s4); }
.flash { display: flex; gap: var(--s2); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r-md); margin: 0 0 var(--s2); font-weight: 600; }
.flash--ok { background: #e3f4ec; color: var(--c-ok); }
.flash--error { background: #fdecea; color: var(--c-bad); }
.notice { background: var(--c-tint); border-radius: var(--r-md); padding: var(--s3) var(--s4); display: flex; gap: var(--s2); }
.notice--warn { background: #fff4d6; color: var(--c-warn); }

/* ── Línea de flotación: el elemento memorable */
.waterline {
  height: 22px;
  background-color: var(--c-water);
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.55) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.55) 1px, transparent 1px),
    linear-gradient(135deg, var(--c-action) 25%, transparent 25%, transparent 75%, var(--c-action) 75%);
  background-size: 22px 22px, 22px 22px, 44px 44px;
}
.waterline--thin { height: 8px; background-size: 8px 8px, 8px 8px, 16px 16px; }

.hero { background: var(--c-surface); }
.hero__sky { padding-top: var(--s7); padding-bottom: var(--s6); }
.hero__title { font-size: clamp(2.2rem, 5.6vw, 3.6rem); font-weight: 700; letter-spacing: -0.035em; max-width: 14ch; margin-bottom: var(--s4); }
.hero__text { font-size: 1.125rem; max-width: 52ch; color: var(--c-muted); margin-bottom: var(--s5); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s3); }
.hero__surface {
  height: 24px; background: var(--c-deep);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 240 24%27%3E%3Cpath d=%27M0 12C40 0 80 0 120 12S200 24 240 12V24H0Z%27/%3E%3C/svg%3E") 0 100% / 240px 24px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 240 24%27%3E%3Cpath d=%27M0 12C40 0 80 0 120 12S200 24 240 12V24H0Z%27/%3E%3C/svg%3E") 0 100% / 240px 24px repeat-x;
  animation: wave 1.6s var(--ease) 1 both;
}
.tiles > li { display: flex; }
.tiles .tile { flex: 1; }
@keyframes wave { from { -webkit-mask-position: -120px 100%; mask-position: -120px 100%; } to { -webkit-mask-position: 0 100%; mask-position: 0 100%; } }
.hero__water { background: var(--c-deep); color: #fff; padding: var(--s6) 0 var(--s7); }
.hero__water-label { color: #cfe1f5; font-weight: 600; margin-bottom: var(--s4); }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; background: rgba(255,255,255,.18); border: 3px solid rgba(255,255,255,.18); border-radius: var(--r-md); overflow: hidden; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--s5);
  min-height: 150px; padding: var(--s4); background: var(--c-deep-2); color: #fff; text-decoration: none;
  transition: background-color .2s var(--ease);
}
.tile:hover { background: var(--c-action); color: #fff; }
.tile__name { font: 600 1.35rem/1.1 var(--f-head); letter-spacing: -0.02em; }
.tile__count { color: #cfe1f5; font-size: .9375rem; }
.tile .icon { width: 28px; height: 28px; color: var(--c-water); }
.tile:hover .icon { color: #fff; }

/* ── Secciones */
.section { padding: var(--s7) 0; }
.section--tight { padding: var(--s6) 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.section__head h2 { margin: 0; }
.lede { font-size: 1.125rem; color: var(--c-muted); max-width: 60ch; }

/* ── Tarjeta de producto */
.grid-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
@media (min-width: 768px) { .grid-products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); } }
@media (min-width: 1200px) { .grid-products--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pcard { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); display: flex; flex-direction: column; overflow: hidden; }
.pcard__img { position: relative; display: block; aspect-ratio: 1; background: var(--c-tint); border-bottom: 1px solid var(--c-line); }
.pcard__img img { width: 100%; height: 100%; object-fit: cover; }
.pcard__body { padding: var(--s3); display: flex; flex-direction: column; gap: var(--s1); flex: 1; }
@media (min-width: 768px) { .pcard__body { padding: var(--s4); } }
.pcard__brand { margin: 0; font-size: .8125rem; color: var(--c-muted); font-weight: 600; }
.pcard__name { font: 600 1rem/1.3 var(--f-body); letter-spacing: 0; margin: 0 0 var(--s2); }
.pcard__name a { color: var(--c-ink); text-decoration: none; }
.pcard__name a:hover { color: var(--c-action); text-decoration: underline; }
.pcard__meta { margin-top: auto; padding-top: var(--s2); display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.pcard__local { font-size: .8125rem; color: var(--c-muted); }
.badge { position: absolute; left: var(--s2); top: var(--s2); padding: 4px 8px; border-radius: var(--r-sm); font-size: .75rem; font-weight: 700; }
.badge--sun { background: var(--c-sun); color: var(--c-deep); }

.price { display: flex; flex-direction: column; }
.price__mxn { font: 700 1.125rem/1.2 var(--f-body); color: var(--c-deep); }
.price__usd { font-size: .8125rem; color: var(--c-muted); }
.price--large .price__mxn { font-size: 1.85rem; font-family: var(--f-head); letter-spacing: -0.02em; }
.price--large .price__usd { font-size: .9375rem; }
.stock { font-size: .8125rem; font-weight: 700; padding: 2px 8px; border-radius: var(--r-sm); }
.stock--ok { background: #e3f4ec; color: var(--c-ok); }
.stock--low { background: #fff4d6; color: var(--c-warn); }
.stock--out { background: #eef1f5; color: var(--c-muted); }

/* ── Franja de servicios */
.services-band { background: var(--c-deep); color: #fff; }
.services-band h2, .services-band h3 { color: #fff; }
.services-band .lede { color: #cfe1f5; }
.svc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: rgba(255,255,255,.16); border-radius: var(--r-md); overflow: hidden; }
@media (min-width: 900px) { .svc-list { grid-template-columns: repeat(2, 1fr); } }
.svc-item { background: var(--c-deep-2); padding: var(--s5); display: grid; grid-template-columns: 1fr auto; gap: var(--s2) var(--s4); align-items: start; }
.svc-item h3 { margin: 0; font-size: 1.15rem; }
.svc-item h3 a { color: #fff; text-decoration: none; }
.svc-item h3 a:hover { text-decoration: underline; }
.svc-item p { grid-column: 1 / -1; margin: 0; color: #cfe1f5; }
.svc-item__price { font-weight: 700; white-space: nowrap; }

/* ── Sucursal */
.store { display: grid; gap: var(--s5); }
@media (min-width: 900px) { .store { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.store__facts { list-style: none; padding: 0; margin: 0 0 var(--s5); display: grid; gap: var(--s3); }
.store__facts li { display: flex; gap: var(--s3); align-items: flex-start; }
.store__facts .icon { color: var(--c-action); margin-top: 2px; }
.store__map { border: 0; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--r-md); background: var(--c-tint); }

/* ── Migas */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2); padding: var(--s4) 0 0; margin: 0; font-size: .875rem; }
.crumbs li + li::before { content: "/"; margin-right: var(--s2); color: var(--c-muted); }
.crumbs span { color: var(--c-muted); }

/* ── Catálogo */
.catalog { display: grid; gap: var(--s5); padding: var(--s5) 0 var(--s7); }
@media (min-width: 1024px) { .catalog { grid-template-columns: 260px 1fr; gap: var(--s6); } }
.filters { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); }
.filters > summary { list-style: none; cursor: pointer; padding: var(--s3) var(--s4); font-weight: 700; display: flex; gap: var(--s2); align-items: center; min-height: 48px; }
.filters > summary::-webkit-details-marker { display: none; }
.filters__body { padding: 0 var(--s4) var(--s4); display: grid; gap: var(--s4); }
@media (min-width: 1024px) { .filters[open] > summary { pointer-events: none; } }
.filters__group { display: grid; gap: var(--s4); }
.filters fieldset { border: 0; margin: 0; padding: 0; }
.filters legend { font-weight: 700; margin-bottom: var(--s2); color: var(--c-deep); }
.filters .cat-tree { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.filters .cat-tree ul { list-style: none; padding-left: var(--s3); margin: 2px 0 0; }
.filters .cat-tree a { display: block; padding: 6px var(--s2); border-radius: var(--r-sm); color: var(--c-ink); text-decoration: none; }
.filters .cat-tree a:hover { background: var(--c-tint); }
.filters .cat-tree a[aria-current] { background: var(--c-deep); color: #fff; font-weight: 700; }
.check { display: flex; gap: var(--s2); align-items: center; min-height: 36px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--c-action); }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.toolbar__count { margin: 0; color: var(--c-muted); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--c-tint); color: var(--c-deep); text-decoration: none; font-size: .875rem; font-weight: 600; }
.chip .icon { width: 14px; height: 14px; }
.pagination { display: flex; justify-content: center; gap: var(--s4); align-items: center; margin-top: var(--s6); }
.pagination a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 var(--s4); border: 1px solid var(--c-line); border-radius: var(--r-md); background: #fff; text-decoration: none; font-weight: 700; }

/* ── Ficha de producto */
.pdp { display: grid; gap: var(--s6); padding: var(--s4) 0 var(--s7); }
@media (min-width: 900px) { .pdp { grid-template-columns: 1.05fr 1fr; align-items: start; } }
.gallery__main { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); overflow: hidden; aspect-ratio: 1; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: var(--s2); margin-top: var(--s2); }
.gallery__thumbs a { width: 72px; height: 72px; border: 1px solid var(--c-line); border-radius: var(--r-sm); overflow: hidden; }
.pdp__brand { color: var(--c-muted); font-weight: 600; margin-bottom: var(--s1); }
.pdp__sku { color: var(--c-muted); font-size: .875rem; }
.pdp__buy > .stock { justify-self: start; }
.pdp__buy { margin: var(--s5) 0; padding: var(--s5) 0; border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); display: grid; gap: var(--s4); }
.buy-row { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: end; }
.qty { display: flex; flex-direction: column; gap: var(--s1); }
.qty input { width: 96px; }
.delivery-notes { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.delivery-notes li { display: flex; gap: var(--s2); align-items: flex-start; }
.delivery-notes .icon { color: var(--c-action); margin-top: 2px; }
.specs { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); overflow: hidden; }
.specs th, .specs td { text-align: left; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--c-line); vertical-align: top; }
.specs th { width: 40%; color: var(--c-muted); font-weight: 600; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }
.prose { max-width: 68ch; }
.prose p { margin-bottom: var(--s4); }

/* ── Formularios */
.form { display: grid; gap: var(--s5); }
.fieldset { border: 1px solid var(--c-line); border-radius: var(--r-md); padding: var(--s5) var(--s4); margin: 0; background: #fff; display: grid; gap: var(--s4); }
@media (min-width: 768px) { .fieldset { padding: var(--s5); } }
.fieldset > legend { font: 600 1.25rem/1.2 var(--f-head); color: var(--c-deep); padding: 0 var(--s2); letter-spacing: -0.01em; }
.row { display: grid; gap: var(--s4); }
@media (min-width: 640px) { .row--2 { grid-template-columns: 1fr 1fr; } .row--3 { grid-template-columns: 2fr 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-weight: 700; font-size: .9375rem; }
.field .hint { font-size: .875rem; color: var(--c-muted); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: 10px var(--s3); border: 1px solid #b7c4d3; border-radius: var(--r-sm);
  background: #fff; color: var(--c-ink); font: inherit;
}
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--c-action); }
.field--error input, .field--error select, .field--error textarea { border-color: var(--c-bad); }
.field__error { color: var(--c-bad); font-size: .875rem; font-weight: 600; display: flex; gap: 4px; align-items: center; }
.field__error .icon { width: 16px; height: 16px; }
.error-summary { border: 2px solid var(--c-bad); border-radius: var(--r-md); background: #fdecea; padding: var(--s4); }
.error-summary h2 { font-size: 1.1rem; color: var(--c-bad); margin-bottom: var(--s2); }
.error-summary ul { margin: 0; padding-left: var(--s5); }
.choice { display: flex; gap: var(--s3); align-items: flex-start; border: 1px solid var(--c-line); border-radius: var(--r-md); padding: var(--s4); cursor: pointer; background: #fff; }
.choice input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--c-action); }
.choice:has(input:checked) { border-color: var(--c-action); background: var(--c-tint); }
.choice.is-disabled { opacity: .65; cursor: not-allowed; }
.choice__title { font-weight: 700; display: block; }
.choice__meta { font-size: .875rem; color: var(--c-muted); display: block; }
.choice__price { margin-left: auto; font-weight: 700; white-space: nowrap; }
.choices { display: grid; gap: var(--s2); }

/* ── Carrito y checkout */
.page-head { padding: var(--s5) 0 var(--s2); }
.cart-layout { display: grid; gap: var(--s5); padding-bottom: var(--s7); }
@media (min-width: 1024px) { .cart-layout { grid-template-columns: 1fr 380px; align-items: start; } }
.cart-lines { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); }
.cart-line { display: grid; grid-template-columns: 72px 1fr; gap: var(--s3); padding: var(--s4); border-bottom: 1px solid var(--c-line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line__img { width: 72px; height: 72px; border-radius: var(--r-sm); overflow: hidden; background: var(--c-tint); }
.cart-line__name { font-weight: 700; color: var(--c-ink); text-decoration: none; }
.cart-line__meta { font-size: .875rem; color: var(--c-muted); }
.cart-line__actions { grid-column: 2; display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; justify-content: space-between; }
.cart-line__actions form { display: flex; gap: var(--s2); align-items: center; }
.cart-line__actions input[type=number] { width: 80px; }
.summary { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); padding: var(--s5); display: grid; gap: var(--s3); }
@media (min-width: 1024px) { .summary { position: sticky; top: 92px; } }
.summary h2 { font-size: 1.25rem; margin: 0 0 var(--s2); }
.summary dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: var(--s2) var(--s4); }
.summary dt { color: var(--c-muted); }
.summary dd { margin: 0; text-align: right; font-weight: 600; }
.summary .total { font: 700 1.35rem/1.2 var(--f-head); color: var(--c-deep); }
.summary__lines { list-style: none; margin: 0; padding: 0 0 var(--s3); border-bottom: 1px solid var(--c-line); display: grid; gap: var(--s2); font-size: .9375rem; }
.summary__lines li { display: flex; justify-content: space-between; gap: var(--s3); }

/* ── Confirmación, cuenta, vacío */
.confirm { max-width: 760px; padding: var(--s6) 0 var(--s7); }
.confirm__folio { font: 700 1.5rem/1.2 var(--f-head); color: var(--c-deep); }
.status-pill { display: inline-flex; gap: 6px; align-items: center; padding: 4px 12px; border-radius: var(--r-pill); font-weight: 700; font-size: .875rem; background: var(--c-tint); color: var(--c-deep); }
.status-pill--pending_payment { background: #fff4d6; color: var(--c-warn); }
.status-pill--paid, .status-pill--delivered { background: #e3f4ec; color: var(--c-ok); }
.status-pill--cancelled, .status-pill--refunded { background: #eef1f5; color: var(--c-muted); }
.pre { white-space: pre-line; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); padding: var(--s4); }
.narrow { max-width: 480px; padding: var(--s6) 0 var(--s7); }
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); overflow: hidden; }
.table th, .table td { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--c-line); text-align: left; }
.table th { font-size: .875rem; color: var(--c-muted); }
.table-scroll { overflow-x: auto; }
.empty { text-align: left; padding: var(--s6); border: 1px dashed var(--c-line); border-radius: var(--r-md); background: #fff; display: grid; gap: var(--s3); justify-items: start; }
.empty .icon { width: 36px; height: 36px; color: var(--c-water); }
.empty__title { font: 600 1.25rem/1.2 var(--f-head); color: var(--c-deep); margin: 0; }
.account-nav { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s5); }
.account-nav a { padding: 8px 14px; border-radius: var(--r-pill); background: #fff; border: 1px solid var(--c-line); text-decoration: none; font-weight: 600; }
.account-nav a[aria-current] { background: var(--c-deep); color: #fff; border-color: var(--c-deep); }

/* ── Pie */
.site-footer { background: var(--c-deep); color: #dbe7f5; margin-top: var(--s7); }
.site-footer a { color: #fff; display: inline-flex; gap: var(--s2); align-items: flex-start; }
.site-footer__grid { display: grid; gap: var(--s5); padding-top: var(--s6); padding-bottom: var(--s5); }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.site-footer p { display: flex; gap: var(--s2); align-items: flex-start; margin-bottom: var(--s2); }
.site-footer .icon { width: 18px; height: 18px; margin-top: 3px; }
.site-footer__name { font: 700 1.25rem/1.2 var(--f-head); color: #fff; }
.site-footer__head { font-weight: 700; color: #fff; }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.site-footer__legal { border-top: 1px solid rgba(255,255,255,.15); padding-top: var(--s4); padding-bottom: var(--s5); font-size: .875rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
