@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Sofia+Sans:ital,wght@0,1..1000;1,1..1000&display=swap');

:root {
  --bg: oklch(97% 0.012 300);
  --surface: #ffffff;
  --ink: oklch(28% 0.02 300);
  --muted: oklch(45% 0.02 300);
  --border: oklch(92% 0.01 300);
  --input-bg: oklch(96% 0.01 300);
  --trust-bg: oklch(95% 0.008 300);
  --card-border: oklch(93% 0.01 300);
  --btn-add-bg: oklch(90% 0.07 160);
  --btn-add-ink: oklch(30% 0.06 160);
  --price-color: oklch(50% 0.12 350);
  --accent: oklch(65% 0.19 20);
  --accent-soft: oklch(97% 0.05 20);
}

html[data-theme="dark"] {
  --bg: oklch(22% 0.015 300);
  --surface: oklch(27% 0.015 300);
  --ink: oklch(92% 0.01 300);
  --muted: oklch(70% 0.015 300);
  --border: oklch(35% 0.015 300);
  --input-bg: oklch(32% 0.015 300);
  --trust-bg: oklch(30% 0.015 300);
  --card-border: oklch(35% 0.015 300);
  --btn-add-bg: oklch(35% 0.08 160);
  --btn-add-ink: oklch(90% 0.06 160);
  --price-color: oklch(78% 0.13 350);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Sofia Sans', sans-serif; }
a { color: oklch(55% 0.16 350); text-decoration: none; }
a:hover { color: oklch(45% 0.18 350); }
html[data-theme="dark"] a { color: oklch(75% 0.14 350); }
html[data-theme="dark"] a:hover { color: oklch(82% 0.12 350); }
img { max-width: 100%; }
input { font-family: 'Sofia Sans', sans-serif; }
input:focus { outline: 2px solid oklch(65% 0.19 20 / 0.4); }
button { font-family: 'Sofia Sans', sans-serif; }

.pixel { font-family: 'Press Start 2P', system-ui; font-weight: 400; }

.page { max-width: 1440px; margin: 0 auto; background: var(--bg); color: var(--ink); }
.page.narrow { max-width: 1200px; }

/* Header */
.site-header {
  display: flex; align-items: center; gap: 24px; padding: 16px 32px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; color: var(--ink); flex-shrink: 0; }
.brand img { width: 36px; height: 36px; object-fit: cover; border-radius: 50%; }
.crumb { font-weight: 700; font-size: 14px; color: var(--muted); }
.crumb a { color: var(--muted); }
.crumb a:hover, .crumb a.active { color: var(--ink); font-weight: 900; }
.search-pill {
  display: flex; align-items: center; background: var(--input-bg); border-radius: 999px;
  padding: 10px 18px; gap: 8px; cursor: pointer; color: var(--ink);
}
.top-nav { display: flex; gap: 22px; font-weight: 700; font-size: 14px; margin-left: auto; }
.header-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; flex-shrink: 0; }
.hamburger-btn { display: none; background: none; border: none; font-size: 22px; line-height: 1; color: var(--ink); cursor: pointer; padding: 4px 6px; flex-shrink: 0; }

/* Layout */
.layout { display: flex; }
.sidebar {
  width: 260px; flex: none; background: var(--surface); border-right: 1px solid var(--border);
  padding: 20px 0; position: sticky; top: 73px; align-self: flex-start;
  max-height: calc(100vh - 73px); overflow-y: auto;
}
.sidebar-title { padding: 0 20px 14px; font-size: 12px; color: var(--muted); }
.cat-group { padding: 10px 20px; border-top: 1px solid var(--border); }
.cat-link { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; color: var(--ink); padding: 6px 0; }
.cat-link.active { font-weight: 900; }
.cat-icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; }
.cat-icon img { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; }
.cat-subitems { display: flex; flex-direction: column; gap: 2px; padding-left: 34px; }
.cat-subitems a { padding: 6px 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.cat-subitems a:hover, .cat-subitems a.active { font-weight: 900; color: var(--ink); }

main.content { flex: 1; min-width: 0; padding: 28px 32px 64px; }
main.content.detail { padding: 40px 32px 64px; }

/* Hero */
.hero {
  position: relative; border-radius: 24px; overflow: hidden; min-height: 280px;
  display: flex; align-items: center; margin-bottom: 32px;
}
.hero img.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero .hero-scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,10,10,0.55) 0%, rgba(20,10,10,0.15) 60%, rgba(20,10,10,0) 100%); z-index: 1; }
.hero .hero-card { position: relative; z-index: 2; background: rgba(255,255,255,0.92); border-radius: 18px; padding: 28px; max-width: 520px; margin: 24px; box-shadow: 0 8px 28px rgba(0,0,0,0.18); }
.hero .hero-card h1 { font-size: 22px; line-height: 1.5; margin: 0 0 14px; color: #1a1a1a; }
.hero .hero-card p { font-size: 15px; line-height: 1.6; color: #333; margin: 0; }

/* Diagonal corner ribbon for categories that work on preorder (Thermos) */
.preorder-ribbon {
  position: absolute; top: 26px; right: -54px; z-index: 3; pointer-events: none;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 13px;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 7px 60px;
  transform: rotate(45deg); box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
/* Smaller variant of the same ribbon, sized for a single out-of-stock
   product's own image (grid thumb, quick-view, gallery) instead of a
   full-width category hero — same visual language, scaled down. */
.preorder-ribbon.sm {
  top: 14px; right: -36px; font-size: 10px; padding: 4px 40px;
}
/* Fixed (non-theme) colors on purpose, like .badge-apartado — --accent-soft
   isn't redefined for dark mode, so pairing it with the theme-aware --ink
   text color went unreadable (light text on a light pink box) once dark
   mode flipped --ink to a light color too. */
.preorder-note {
  background: oklch(93% 0.06 20); border: 1px solid oklch(80% 0.11 20); border-radius: 16px;
  padding: 18px 22px; margin: -14px 0 32px; display: flex; flex-direction: column; gap: 6px;
}
.preorder-note strong { font-size: 14px; color: oklch(32% 0.13 20); }
.preorder-note p { font-size: 13px; line-height: 1.6; color: oklch(38% 0.09 20); margin: 0; }
.preorder-note .preorder-wa {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  background: oklch(32% 0.13 20); color: #fff; font-size: 12.5px; font-weight: 700;
  padding: 8px 14px; border-radius: 999px; text-decoration: none; margin-top: 4px;
}
.preorder-note .preorder-wa:hover { background: oklch(26% 0.12 20); }

/* Compact variant: the per-product note (Site.preorderNoteHtml) sits right
   under the gallery image instead of the full-width category banner, so it
   needs its own smaller scale and a normal top margin instead of the
   negative one tuned for sitting right under the category hero/desc. */
.preorder-note.compact { padding: 12px 16px; margin: 16px 0 0; gap: 4px; border-radius: 12px; }
.preorder-note.compact strong { font-size: 12.5px; }
.preorder-note.compact p { font-size: 12px; line-height: 1.5; }
.preorder-note.compact .preorder-wa { font-size: 11.5px; padding: 6px 12px; margin-top: 2px; }

/* Small "Pre orden" pill next to a category's name in the sidebar/menu */
.cat-preorder-badge {
  display: inline-block; background: oklch(93% 0.06 20); color: oklch(32% 0.13 20);
  font-size: 10px; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; vertical-align: middle;
}

/* Landing hero (with CTA) */
.landing-hero { position: relative; border-radius: 24px; padding: 40px; display: flex; align-items: center; overflow: hidden; margin-bottom: 28px; min-height: 380px; background-size: cover; background-position: center 90%; }
.landing-hero .hero-scrim { background: linear-gradient(90deg, rgba(20,10,30,0.65) 0%, rgba(20,10,30,0.15) 60%, rgba(20,10,30,0) 100%); }
.landing-hero .hero-card { flex: 1 1 420px; max-width: 520px; backdrop-filter: blur(2px); }
.landing-hero h1 { font-size: 18px; line-height: 1.6; margin: 0 0 16px; color: #1a1a1a; }
.landing-hero p.sub { font-size: 16px; line-height: 1.6; color: #333; margin: 0; }

/* Trust strip */
.trust-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 32px; }
.trust-item { background: var(--trust-bg); border-radius: 14px; padding: 16px 14px; display: flex; align-items: center; gap: 10px; }
.trust-item .ic { font-size: 22px; }
.trust-item img { width: 22px; height: 22px; object-fit: contain; }
.trust-item span.label { font-family: 'Baloo 2', sans-serif; font-weight: 600; font-size: 12px; letter-spacing: 0.02em; color: var(--ink); line-height: 1.25; }

/* Section heading */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 { font-size: 16px; margin: 0; color: var(--ink); }
.section-head a { font-weight: 700; font-size: 14px; }

/* Product grid & cards */
.product-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.product-card { background: var(--surface); border-radius: 16px; overflow: hidden; border: 1px solid var(--card-border); display: flex; flex-direction: column; }
.product-thumb { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; position: relative; }
/* cover, not contain: source photos from Airtable come with wildly
   different amounts of built-in padding (some retailers crop tight, others
   leave a lot of white space) — cropping to fill the frame is what actually
   makes every product look the same size next to each other in a grid. */
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ph-tag { font-family: ui-monospace, monospace; font-size: 11px; color: oklch(35% 0.02 300 / 0.7); background: #fff; padding: 3px 8px; border-radius: 6px; }
.quickview-btn { position: absolute; top: 10px; right: 10px; z-index: 4; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.95); display: flex; align-items: center; justify-content: center; font-size: 15px; box-shadow: 0 2px 6px rgba(0,0,0,0.15); cursor: pointer; border: none; }
.product-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-name { font-weight: 700; font-size: 14px; line-height: 1.3; color: var(--ink); }
.product-price { font-weight: 800; font-size: 17px; color: var(--price-color); margin-top: auto; }
.btn-add {
  background: var(--btn-add-bg); color: var(--btn-add-ink); border: none; font-weight: 700;
  font-size: 13px; padding: 10px; border-radius: 10px; cursor: pointer; margin-top: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
}
/* Momentary confirmation state after "Agregar al carrito" is clicked (see
   Site.flashAdded) — a solid, more saturated green than the default pill so
   it reads as a distinct state, not just the button's normal look. */
.btn-add.is-added, .qv-add.is-added {
  background: oklch(48% 0.15 155); color: #fff;
}
/* Preorder items swap the purchase button for a WhatsApp contact link
   (same class as .btn-add/.qv-add for identical sizing) — fixed colors so
   it reads as "different action" from the normal add-to-cart green/pink,
   not just a disabled state. */
.preorder-contact-btn {
  display: block; text-align: center; text-decoration: none;
  background: oklch(32% 0.13 20) !important; color: #fff !important;
}
.preorder-contact-btn:hover { background: oklch(26% 0.12 20) !important; }

/* Subcat pills */
.pill-row { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.pill { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.pill.active { background: var(--accent); color: #fff; }

.empty-note { border: 1px dashed var(--border); border-radius: 16px; padding: 48px; text-align: center; font-size: 14px; color: var(--muted); }
.catalog-error { border: 1px dashed oklch(60% 0.12 30); border-radius: 16px; padding: 48px; text-align: center; font-size: 14px; color: oklch(45% 0.12 30); }

/* Search dropdown */
.search-pill { position: relative; }
.search-pill input {
  border: none; background: transparent; font-family: 'Sofia Sans', sans-serif; font-size: 14px; font-weight: 700;
  color: var(--ink); outline: none; width: 140px;
}
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; width: 320px; max-height: 360px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  z-index: 40;
}
.search-result-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.search-result-item img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; background: var(--input-bg); }
.search-result-item .info { flex: 1; min-width: 0; }
.search-result-item .name { font-size: 13px; font-weight: 700; color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-item .price { font-size: 12px; color: var(--muted); }
.search-result-empty, .search-result-loading { padding: 16px; text-align: center; font-size: 13px; color: var(--muted); }

.sidebar-scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 85; }

/* Footer */
.site-footer {
  background: var(--surface); border-top: 1px solid var(--border); padding: 32px;
  display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; font-size: 13px; color: var(--muted);
}
.theme-toggle { display: flex; align-items: center; gap: 4px; background: var(--input-bg); border-radius: 999px; padding: 6px; cursor: pointer; }
.theme-toggle .dot { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; }
.theme-toggle .dot img { width: 28px; height: 28px; object-fit: contain; }
.theme-toggle .dot.active { background: var(--surface); }

/* Floating buttons */
.fab { position: fixed; right: 20px; width: 64px; height: 64px; z-index: 30; }
.fab-home { bottom: 20px; cursor: pointer; }
.fab-home img { width: 64px; height: 64px; object-fit: contain; border-radius: 50%; box-shadow: 0 4px 14px rgba(0,0,0,0.2); background: var(--surface); }
.fab-ig, .fab-tiktok, .fab-wa, .fab-fb { width: 44px; height: 44px; right: 30px; }
.fab-ig { bottom: 96px; }
.fab-tiktok { bottom: 172px; }
.fab-wa { bottom: 248px; }
.fab-fb { bottom: 324px; }
.fab img { width: 100%; height: 100%; object-fit: contain; }

/* Cart widget */
.cart-widget { position: relative; display: inline-flex; }
.cart-icon-btn { background: none; border: none; cursor: pointer; padding: 0; color: var(--ink); display: inline-flex; align-items: center; }
.cart-icon-btn img { width: 26px; height: 26px; object-fit: contain; }
.cart-badge {
  position: absolute; top: -8px; right: -10px; background: var(--accent); color: #fff; font-size: 11px;
  font-weight: 800; border-radius: 999px; min-width: 18px; height: 18px; display: flex; align-items: center;
  justify-content: center; padding: 0 4px;
}
.cart-scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 80; }
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 380px; max-width: 92vw; background: #fff; z-index: 81;
  box-shadow: -8px 0 24px rgba(0,0,0,0.2); display: flex; flex-direction: column; font-family: 'Sofia Sans', sans-serif; color: #28222e;
}
.cart-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid #eee; }
.cart-drawer-head .title { font-size: 13px; }
.cart-drawer-head .close { cursor: pointer; font-size: 20px; color: #888; background: none; border: none; }
.cart-drawer-body { flex: 1; overflow-y: auto; padding: 8px 20px; display: flex; flex-direction: column; gap: 4px; }
.cart-empty-msg { text-align: center; color: #888; font-size: 14px; padding: 60px 0; }
.cart-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eee; }
.cart-line .info { flex: 1; }
.cart-line .name { font-weight: 700; font-size: 13px; }
.cart-line .meta { font-size: 12px; color: #888; }
.cart-line .remove { cursor: pointer; font-size: 16px; color: #888; background: none; border: none; }
.cart-drawer-foot { padding: 20px; border-top: 1px solid #eee; display: flex; flex-direction: column; gap: 10px; }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 800; font-size: 16px; }
.btn-checkout { text-align: center; background: var(--accent); color: #fff; font-weight: 800; font-size: 15px; padding: 14px; border-radius: 999px; display: block; }
.btn-checkout.disabled { background: oklch(75% 0.01 300); pointer-events: none; }

/* Quick view modal */
.qv-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; }
.qv-box { background: var(--surface); border-radius: 18px; padding: 24px; max-width: 760px; width: 100%; display: flex; gap: 24px; }
.qv-left { display: flex; flex-direction: column; gap: 10px; flex: none; }
.qv-image { position: relative; width: 320px; height: 320px; background: #fff; border-radius: 12px; overflow: hidden; }
.qv-image img { width: 100%; height: 100%; object-fit: contain; }
.qv-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(255,255,255,0.9); box-shadow: 0 2px 6px rgba(0,0,0,0.15); font-size: 14px; cursor: pointer; }
.qv-arrow.prev { left: 6px; } .qv-arrow.next { right: 6px; }
.qv-thumbs { display: flex; gap: 6px; }
.qv-thumbs img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 6px; border: 2px solid var(--border); cursor: pointer; padding: 2px; }
.qv-thumbs img.active { border-color: var(--accent); }
.qv-right { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.qv-close { cursor: pointer; align-self: flex-end; font-size: 18px; color: var(--muted); background: none; border: none; }
.qv-name { font-weight: 800; font-size: 17px; color: var(--ink); }
.qv-price { font-weight: 800; font-size: 20px; color: var(--price-color); }
.qv-add { background: var(--btn-add-bg); color: var(--btn-add-ink); border: none; font-weight: 700; font-size: 14px; padding: 12px; border-radius: 10px; cursor: pointer; margin-top: auto; transition: background-color 0.3s ease, color 0.3s ease; }
.qv-link { text-align: center; font-size: 13px; font-weight: 700; }

/* Product detail */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; max-width: 1040px; margin: 0 auto; }
.detail-grid.simple { max-width: 900px; }
.gallery-main { position: relative; aspect-ratio: 1; background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-main.zoomable { cursor: zoom-in; }
.gallery-main.zoomable img { transition: transform 0.3s ease-out; will-change: transform; }

.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 80;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-img { max-width: 92vw; max-height: 92vh; object-fit: contain; border-radius: 8px; background: #fff; }
.lightbox-close {
  position: absolute; top: 18px; right: 24px; width: 40px; height: 40px;
  border-radius: 50%; border: none; background: rgba(255,255,255,0.15);
  color: #fff; font-size: 18px; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }
.lightbox-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px;
  border-radius: 50%; border: none; background: rgba(255,255,255,0.15); color: #fff;
  font-size: 22px; cursor: pointer;
}
.lightbox-arrow:hover { background: rgba(255,255,255,0.3); }
.lightbox-arrow.prev { left: 18px; } .lightbox-arrow.next { right: 18px; }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(255,255,255,0.9); box-shadow: 0 2px 8px rgba(0,0,0,0.15); font-size: 16px; cursor: pointer; }
.gallery-arrow.prev { left: 10px; } .gallery-arrow.next { right: 10px; }
/* Wrapping grid (not a single flex row): with 7+ photos a nowrap row used to
   spill out of the gallery column and over the product text beside it. */
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 8px; margin-top: 12px; }
.gallery-thumbs img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 10px; border: 2px solid var(--border); cursor: pointer; padding: 4px; box-sizing: border-box; }
.gallery-thumbs img.active { border-color: var(--accent); }
.detail-info { display: flex; flex-direction: column; gap: 16px; }
.detail-badge { display: inline-block; background: var(--input-bg); color: var(--muted); font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; margin-bottom: 10px; }
.detail-info h1 { font-size: 20px; line-height: 1.5; margin: 0; color: var(--ink); }
.detail-price { font-weight: 800; font-size: 26px; color: var(--price-color); }
.qty-row { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
/* Variant picker (Airtable "Selecciona uno"), same look as the subcat pills */
.option-picker { margin-top: 4px; }
.option-label { font-weight: 800; font-size: 13px; margin-bottom: 8px; }
.option-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.option-pill { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.option-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.option-error { color: var(--accent); font-size: 13px; font-weight: 700; margin-top: 8px; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.qty-stepper button { width: 40px; height: 40px; border: none; background: var(--input-bg); color: var(--ink); font-size: 18px; font-weight: 700; cursor: pointer; }
.qty-stepper .val { width: 44px; text-align: center; font-weight: 800; font-size: 15px; }
.qty-stepper button:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-add-cart { flex: 1; background: var(--accent); color: #fff; border: none; font-weight: 800; font-size: 15px; padding: 14px; border-radius: 999px; cursor: pointer; }
.btn-reserve { background: transparent; color: var(--ink); border: 2px solid var(--accent); font-weight: 800; font-size: 15px; padding: 12px; border-radius: 999px; cursor: pointer; }
.btn-add-cart:disabled, .btn-reserve:disabled { opacity: 0.4; cursor: not-allowed; }
.hint-text { font-size: 12px; line-height: 1.5; color: var(--muted); margin: 0; }
.added-msg { font-size: 13px; color: oklch(45% 0.12 150); font-weight: 700; }
html[data-theme="dark"] .added-msg { color: oklch(75% 0.14 150); }
.detail-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 20px; border-top: 1px solid var(--border); padding-top: 24px; }
.detail-cols h2, .detail-extra h2 { font-weight: 800; font-size: 14px; letter-spacing: 0.03em; margin: 0 0 10px; }
.detail-cols ul, .detail-extra ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; color: var(--ink); }
.detail-extra { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 24px; }
.detail-info p { font-size: 14px; line-height: 1.7; color: var(--ink); margin: 0; }
.detail-desc { font-size: 14px; line-height: 1.7; color: var(--ink); white-space: pre-line; }
.not-found { text-align: center; padding: 60px 0; }
.not-found p { font-size: 15px; color: var(--muted); }

/* Checkout */
.checkout-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; }
.checkout-panel { background: var(--surface); border-radius: 16px; border: 1px solid var(--border); padding: 24px; }
.checkout-panel h2 { font-size: 14px; margin: 0 0 18px; }
.order-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.order-line .info { flex: 1; }
.order-line .name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.order-line .name { font-weight: 700; font-size: 14px; }
.badge-apartado { background: oklch(93% 0.09 80); color: oklch(35% 0.10 60); font-size: 10px; font-weight: 800; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 999px; }
.order-line .meta { font-size: 12px; color: var(--muted); }
.order-line .subtotal { font-weight: 800; font-size: 14px; }
.order-total-row { display: flex; justify-content: space-between; font-weight: 800; font-size: 18px; padding-top: 16px; }
.reserved-block { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.reserved-block .row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.reserved-block .row.strong { font-weight: 800; font-size: 15px; color: var(--ink); }
.checkout-panel input[type=text], .checkout-panel input[type=email], .checkout-panel input[type=tel] {
  padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--input-bg); color: var(--ink); font-size: 14px; width: 100%;
}
.form-col { display: flex; flex-direction: column; gap: 14px; }
.pay-label { font-weight: 700; font-size: 13px; color: var(--muted); margin-top: 4px; }
.pay-options { display: flex; gap: 10px; }
.pay-option { flex: 1; border: 2px solid oklch(90% 0.01 300); background: #fff; color: #1a1a1a; border-radius: 10px; padding: 12px; cursor: pointer; text-align: center; font-weight: 700; font-size: 13px; }
.pay-option.active { border-color: var(--accent); background: var(--accent-soft); }
.deposit-block { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.deposit-block .lbl { font-weight: 700; font-size: 13px; color: var(--muted); }
.deposit-note { font-size: 12px; line-height: 1.5; color: var(--muted); }
.btn-finalize { margin-top: 8px; background: var(--accent); color: #fff; border: none; font-weight: 800; font-size: 15px; padding: 14px; border-radius: 999px; cursor: pointer; width: 100%; }
.btn-finalize:disabled { background: oklch(75% 0.01 300); cursor: not-allowed; }

/* Receipt */
.receipt-wrap { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.receipt {
  position: relative; background: #ffffff; border-radius: 20px; padding: 30px 22px 24px; width: 340px; max-width: 90vw;
  font-family: ui-monospace, 'SF Mono', monospace; box-shadow: 0 20px 60px rgba(0,0,0,0.2); color: #1a1a1a;
}
.receipt .sticker { position: absolute; top: -16px; right: -12px; width: 40px; height: 40px; object-fit: contain; transform: rotate(8deg); filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25)); }
.receipt .title { text-align: center; font-family: 'Press Start 2P', system-ui; font-size: 18px; margin-bottom: 4px; }
.receipt .subtitle { text-align: center; font-size: 11px; color: #555; letter-spacing: 0.04em; margin-bottom: 16px; }
.receipt .meta { font-size: 12px; color: #333; line-height: 1.7; }
.receipt .dashed { border-top: 1px dashed #999; margin: 14px 0; }
.receipt .cols-head { display: flex; font-size: 11px; font-weight: 700; color: #555; }
.receipt .cols-head .qty { width: 32px; } .receipt .cols-head .item { flex: 1; }
.receipt .item-row { display: flex; font-size: 12px; color: #222; padding: 4px 0; }
.receipt .item-row .qty { width: 32px; } .receipt .item-row .item { flex: 1; }
.receipt .grand-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 14px; }
.receipt .sub-row { display: flex; justify-content: space-between; font-weight: 800; font-size: 13px; padding: 2px 0; }
.receipt .sub-row.light { font-weight: 400; font-size: 12px; color: #333; }
.receipt .thanks { text-align: center; font-size: 11px; color: #555; line-height: 1.6; }
.receipt .barcode { display: flex; justify-content: center; margin: 18px 0 4px; }
.receipt .barcode canvas, .receipt .barcode div { width: 240px; height: 48px; }
.receipt .order-no { text-align: center; font-size: 10px; color: #777; letter-spacing: 0.05em; }
.wa-note { width: 340px; max-width: 90vw; background: oklch(96% 0.05 150); border: 1px solid oklch(85% 0.08 150); border-radius: 12px; padding: 14px 16px; font-size: 13px; line-height: 1.5; color: oklch(30% 0.05 150); text-align: center; }
.wa-cta { position: relative; display: block; width: 340px; max-width: 90vw; }
.wa-cta img { width: 100%; display: block; }
.wa-cta .label { position: absolute; z-index: 2; left: 15%; right: 4%; top: 20%; bottom: 18%; display: flex; align-items: center; justify-content: center; }
.wa-cta .label span { background: #fff; border-radius: 8px; padding: 6px 10px; text-align: center; font-weight: 800; font-size: 13px; color: #1a1a1a; line-height: 1.3; }
.receipt-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn-download { display: flex; align-items: center; gap: 8px; background: #2b2b2b; color: #fff; border: none; font-weight: 700; font-size: 14px; padding: 12px 20px; border-radius: 10px; cursor: pointer; }
.btn-back-store { display: flex; align-items: center; background: oklch(92% 0.01 300); color: #333; font-weight: 700; font-size: 14px; padding: 12px 20px; border-radius: 10px; }

@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2,1fr); }
  .trust-strip { grid-template-columns: repeat(2,1fr); }
  .detail-grid, .checkout-grid, .detail-cols { grid-template-columns: 1fr; }
  .top-nav { display: none; }

  /* Header: brand + cart/user stay fixed size, the search pill shrinks to
     whatever's left instead of forcing the row wider than the screen
     (that overflow used to push the cart button off-screen entirely). */
  .site-header { padding: 12px 16px; gap: 10px; }
  .search-pill { flex: 1 1 auto; min-width: 0; }
  .search-pill input { width: 100%; min-width: 0; }
  .search-results { width: min(320px, calc(100vw - 32px)); }
  .hamburger-btn { display: flex; align-items: center; }

  /* Sidebar becomes an off-canvas drawer (opened by the hamburger button)
     instead of just disappearing with no way to browse categories. */
  .sidebar {
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; height: 100vh; max-height: none;
    width: 280px; max-width: 85vw; z-index: 90;
    transform: translateX(-100%); transition: transform 0.25s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.2);
  }
  .sidebar.mobile-open { transform: translateX(0); }

  /* Quick-view: side-by-side image+info doesn't fit a phone screen. */
  .qv-box { flex-direction: column; max-height: 88vh; overflow-y: auto; }
  .qv-left { flex: none; }

  /* Floating buttons: keep only the Daruki home button on phone/tablet —
     the social icons are dropped entirely (not just resized) so they
     can't cover page content. */
  .fab-home { bottom: 16px; right: 16px; }
  .fab-ig, .fab-tiktok, .fab-wa, .fab-fb { display: none; }
  .qv-image { width: 100%; height: auto; aspect-ratio: 1; }
  .qv-thumbs { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .landing-hero { padding: 20px; min-height: 320px; }
  .hero .hero-card, .landing-hero .hero-card { padding: 18px; margin: 0; max-width: 100%; }
  .landing-hero h1 { font-size: 16px; }
  main.content, main.content.detail { padding: 20px 16px 48px; }
  .qty-row { flex-wrap: wrap; }
  .btn-add-cart { width: 100%; }
}

@media (max-width: 380px) {
  /* The smallest common phones (iPhone SE, older/budget Android ~320-360px)
     don't have room for the "Daruki" wordmark next to the search bar and
     cart — drop the text (keep the logo) rather than let the cart icon get
     pushed off-screen. */
  .site-header { gap: 6px; padding: 10px 12px; }
  .brand { font-size: 0; gap: 0; }
  .search-pill { padding: 8px 10px; }
  .header-actions { gap: 10px; }
}

.checkout-error { background: #ffe9ec; border: 2px solid #ff6b81; border-radius: 10px; color: #a3122a; padding: 10px 12px; font-size: 14px; line-height: 1.4; }
.checkout-error[hidden] { display: none; }
.deposit-plan { font-family: inherit; line-height: 1.4; }
.deposit-plan-amt { font-size: 15px; font-weight: 800; }

/* "Pronto" placeholder card for subcats announced but not on sale yet
   (CATEGORIES[...].soonSubcats in js/catalog.js) */
.soon-card .product-thumb { overflow: hidden; }
.soon-card .soon-icon { width: 45%; height: auto; object-fit: contain; }
.soon-card .soon-note { font-size: 13px; font-weight: 700; color: var(--accent); }
.soon-card .btn-add[disabled] { opacity: 0.6; cursor: default; }

/* Page links under long product grids (js/category.js renderPager) */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 28px 0 8px; }
.pager-btn { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; min-width: 40px; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.pager-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager-btn[disabled] { opacity: 0.4; cursor: default; }
