/* Mandaditos — estilos de componentes, animaciones y respaldo visual.
   Tailwind (CDN) cubre la retícula de la página; este archivo cubre
   piezas que se repiten, el carrito y el movimiento. */

:root {
  --accent: #1B3A6F;
  --accent-contrast: #fff;
  --ember: #E36A1E;
  --paper: #F8FAFC;
  --ink: #0F172A;
  --muted: #334155;
  --line: #E2E8F0;
  --card: #FFFFFF;
  --sand: #1B3A6F;
  --danger: #DC2626;
  --ok: #16A34A;
  --header-offset: 0.75rem;
  color-scheme: light;
}

body[data-store="costco"] {
  --accent: #1E3A8A;
  --sand: #DC2626;
}

body[data-store="sams"] {
  --accent: #0284C7;
  --sand: #16A34A;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Outfit, system-ui, sans-serif;
  line-height: 1.45;
}

body.cart-open,
body.modal-open { overflow: hidden; }

body.has-dock {
  padding-bottom: calc(5.75rem + env(safe-area-inset-bottom));
}

h1, h2, .display {
  font-family: Fraunces, Georgia, serif;
  font-weight: 560;
  letter-spacing: -0.03em;
}

button, input, select, textarea { font: inherit; color: inherit; }

button { touch-action: manipulation; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  background: white;
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  border-radius: 0.6rem;
}

.skip:focus { top: 0.75rem; }

.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 3px 0 var(--accent), inset 0 -2px 0 var(--ember), 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.28s ease;
}

.site-header.is-hidden {
  transform: translateY(-105%);
  pointer-events: none;
}

.brand-link { min-width: 0; }

.logo-mark {
  display: block;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 999px;
  object-fit: cover;
  flex: none;
  background: #111;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ember);
}

.brand-name {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.25rem;
  line-height: 1;
}

.brand-city {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.segmented {
  display: inline-flex;
  padding: 0.2rem;
  gap: 0.15rem;
  background: #E2E8F0;
  border-radius: 999px;
}

.segmented button {
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.42rem 0.75rem;
  font-size: 0.84rem;
  font-weight: 650;
}

.segmented button[aria-selected="true"] {
  background: var(--accent);
  color: white;
  box-shadow: 0 6px 16px rgba(27, 58, 111, 0.28);
}

.segmented button[data-store-tab="costco"][aria-selected="true"] {
  background: linear-gradient(100deg, #1E3A8A 0%, #1E3A8A 58%, #DC2626 100%);
  color: white;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.28);
}

.segmented button[data-store-tab="sams"][aria-selected="true"] {
  background: linear-gradient(100deg, #0284C7 0%, #0284C7 58%, #16A34A 100%);
  color: white;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.32);
}

.search-wrap { position: relative; }

.search-wrap svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  padding: 0 2.5rem 0 2.5rem;
}

.search-wrap input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.search-clear {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
}

.chip-row {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 0.42rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 650;
}

.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: transparent;
  color: white;
}

.only-desktop { display: none; }

.cart-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.75rem;
  padding: 0 0.85rem 0 0.7rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-weight: 650;
}

.cart-button strong {
  display: grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--sand);
  color: #1c2430;
  font-size: 0.75rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  font-size: 0.82rem;
  font-weight: 600;
}

.steps span {
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  flex: none;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
}

.ticket {
  background: var(--card);
  border-radius: 1.25rem;
  padding: 1.1rem 1.15rem 1rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  transform: rotate(1.25deg);
  border: 1px solid rgba(28, 36, 48, 0.06);
}

.ticket-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ticket-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.55rem;
  font-size: 0.92rem;
}

.ticket-row strong { font-weight: 650; }

.ticket-total {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--line);
  font-family: Fraunces, Georgia, serif;
  font-size: 1.25rem;
}

.catalog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.sort-select {
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  padding: 0 0.8rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid #E2E8F0;
  border-radius: 1.2rem;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
  animation: rise 0.4s ease both;
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #E2E8F0;
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.badge, .promo {
  position: absolute;
  top: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge { left: 0.65rem; }
.promo { right: 0.65rem; background: #DC2626; color: white; }

.badge i {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 99px;
  background: white;
}

.badge-costco { background: linear-gradient(100deg, #1E3A8A 0%, #1E3A8A 62%, #DC2626 100%); }
.badge-costco i { background: #FECACA; }
.badge-sams { background: linear-gradient(100deg, #0284C7 0%, #0284C7 62%, #16A34A 100%); }
.badge-sams i { background: #BBF7D0; }

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0.85rem 0.9rem 0.95rem;
}

.product-cat {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-name {
  margin: 0.28rem 0 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  min-height: 3.7rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.product-price {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  line-height: 1;
}

.price-was {
  margin-left: 0.3rem;
  color: var(--muted);
  font-family: Outfit, sans-serif;
  font-size: 0.75rem;
  text-decoration: line-through;
}

.qty {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem;
  border-radius: 999px;
  background: #E2E8F0;
}

.qty button {
  width: 1.9rem;
  height: 1.9rem;
  border: 0;
  border-radius: 999px;
  background: white;
  font-size: 1rem;
  line-height: 1;
}

.qty button:disabled { opacity: 0.35; cursor: default; }

.qty span {
  min-width: 1.4rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
}

.in-cart {
  min-height: 1rem;
  margin: 0.45rem 0 0;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.btn-add, .btn-primary, .btn-whatsapp, .btn-mail, .btn-ghost {
  border: 0;
  border-radius: 999px;
  font-weight: 700;
}

.btn-add {
  width: 100%;
  height: 2.7rem;
  margin-top: 0.55rem;
  background: var(--accent);
  color: white;
}

.btn-add.is-added { background: var(--ok); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.8rem;
  padding: 0 1.1rem;
  background: var(--ember);
  color: white;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(227, 106, 30, 0.28);
}

.empty-state {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
}

.empty-state button, .btn-ghost {
  background: transparent;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

#cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  border: 0;
  background: rgba(22, 28, 36, 0.46);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#cart-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

#cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: min(100%, 560px);
  height: 100dvh;
  overflow: hidden;
  background: var(--card);
  box-shadow: -20px 0 50px rgba(28, 36, 48, 0.16);
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

#cart-drawer.is-open { transform: translateX(0); }

@media (min-width: 768px) {
  #cart-drawer {
    top: 50%;
    left: 50%;
    right: auto;
    width: min(92vw, 760px);
    height: min(90dvh, 900px);
    border-radius: 1.5rem;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -47%) scale(0.98);
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.3s;
  }

  #cart-drawer.is-open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }
}

.drawer-head, .drawer-foot {
  padding: 0.9rem 1rem;
  background: var(--card);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 { margin: 0; font-size: 1.45rem; }

.drawer-head p { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.82rem; }

.drawer-head-actions { display: flex; align-items: center; gap: 0.35rem; }

.icon-close {
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 999px;
  background: #E2E8F0;
  font-size: 1.4rem;
  line-height: 1;
}

#cart-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.35rem 1.25rem 1.25rem;
  overscroll-behavior: contain;
}

.cart-guest-icon {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  background: #E0F2FE;
  color: var(--accent);
}

.order-notes {
  margin: 1.1rem 0 0;
}

.order-notes span em,
.profile-form .field span em {
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

.order-notes textarea { min-height: 4.4rem; }

.cart-empty {
  padding: 2.5rem 0.5rem;
  text-align: center;
}

.cart-empty h3 {
  margin: 0.4rem 0 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.6rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.cart-item img {
  width: 4.2rem;
  height: 4.2rem;
  object-fit: cover;
  border-radius: 0.8rem;
  background: #E2E8F0;
}

.cart-item h3 { margin: 0; font-size: 0.92rem; line-height: 1.3; }

.cart-item .meta { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.75rem; }

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.line-sub { margin: 0; font-weight: 700; }

.linkish {
  border: 0;
  background: transparent;
  color: var(--danger);
  padding: 0;
  font-size: 0.78rem;
  font-weight: 700;
}

.field { display: block; margin-bottom: 1.05rem; }

.field span {
  display: block;
  margin-bottom: 0.42rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.field input, .field select, .field textarea {
  width: 100%;
  min-height: 3.2rem;
  border: 1px solid #CBD5E1;
  border-radius: 0.95rem;
  background: white;
  padding: 0.85rem 1rem;
  font-size: 1rem;
}

.field textarea { min-height: 6.75rem; resize: vertical; }

.field .is-invalid, .is-invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.drawer-foot {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  padding: 0.9rem 1.25rem calc(0.9rem + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 28px rgba(15, 23, 42, 0.06);
}

.drawer-foot .loyalty-banner { margin: 0; padding: 0.6rem 0.8rem; font-size: 0.88rem; }

.delivery-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid #BAE6FD;
  border-radius: 1rem;
  background: #F0F9FF;
}

.delivery-card:empty { display: none; }

.delivery-card[data-state="missing"] {
  border-color: #FDE68A;
  background: #FFFBEB;
}

.delivery-icon {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background: white;
  color: var(--accent);
}

.delivery-card[data-state="missing"] .delivery-icon { color: #B45309; }

.delivery-text {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.delivery-kicker {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.delivery-change {
  align-self: center;
  padding: 0.4rem 0.75rem;
  border: 1px solid #7DD3FC;
  border-radius: 999px;
  background: white;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.delivery-card[data-state="missing"] .delivery-change {
  border-color: #F59E0B;
  background: #F59E0B;
  color: white;
}

.summary {
  background: #F1F5F9;
  border-radius: 1rem;
  padding: 0.8rem 1rem;
}

.cart-zone { margin: 0; }

.cart-zone span { margin-bottom: 0.3rem; font-size: 0.82rem; }

.cart-zone select {
  min-height: 2.9rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.cart-zone select.is-pending {
  border-color: #F59E0B;
  background-color: #FFFBEB;
  color: #92400E;
}

#sum-fee { white-space: nowrap; }

@media (max-width: 767px) {
  #cart-drawer {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: auto;
    border-radius: 0;
  }

  .drawer-foot { gap: 0.55rem; padding-top: 0.75rem; }
  .drawer-foot .loyalty-banner { padding: 0.45rem 0.7rem; font-size: 0.8rem; }
  .delivery-card { padding: 0.55rem 0.65rem; gap: 0.55rem; }
  .delivery-icon { width: 1.8rem; height: 1.8rem; }
  .delivery-text { font-size: 0.82rem; }
  .drawer-foot .summary { padding: 0.6rem 0.85rem; }
  .drawer-foot .summary-row.total { font-size: 1.1rem; margin-top: 0.3rem; padding-top: 0.3rem; }
  #sum-note { display: none; }
  .drawer-foot .btn-whatsapp { min-height: 3rem; }
}

@media (min-width: 768px) {
  .drawer-foot {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: stretch;
    gap: 0.75rem 1rem;
    padding: 1rem 1.5rem 1.25rem;
  }

  .drawer-foot > .loyalty-banner,
  .drawer-foot > .summary,
  .drawer-foot > .form-error,
  .drawer-foot > #whatsapp-actions { grid-column: 1 / -1; }

  .delivery-card { align-content: center; }

  .drawer-foot > .cart-zone { align-self: center; }

  .delivery-text { -webkit-line-clamp: 4; }

  #cart-scroll { padding: 0.5rem 1.75rem 1.5rem; }

  .drawer-head { padding: 1.1rem 1.75rem; }

  .cart-item { grid-template-columns: 5rem 1fr; gap: 1rem; padding: 1rem 0; }

  .cart-item img { width: 5rem; height: 5rem; }

  .cart-item h3 { font-size: 1rem; }
}

@media (min-width: 1024px) {
  #cart-drawer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 23rem;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(94vw, 1080px);
    height: min(88dvh, 820px);
  }

  #cart-drawer > .drawer-head { grid-column: 1 / -1; }

  #cart-drawer > #cart-scroll,
  #cart-drawer > #cart-guest { grid-column: 1; grid-row: 2; }

  #cart-drawer > #cart-guest,
  #cart-drawer:has(#cart-footer[hidden]) > #cart-scroll { grid-column: 1 / -1; }

  #cart-drawer > .drawer-foot {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 0;
    overflow-y: auto;
    padding: 1.25rem 1.4rem 1.4rem;
    border-top: 0;
    border-left: 1px solid var(--line);
    background: #F8FAFC;
    box-shadow: none;
  }

  #cart-drawer > .drawer-foot .summary { background: white; border: 1px solid var(--line); }

  #cart-drawer > .drawer-foot > #whatsapp-actions { margin-top: auto; }

  .delivery-card { background: white; }

  .delivery-text { -webkit-line-clamp: 5; }
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
}

.summary-row + .summary-row { margin-top: 0.28rem; }

.summary-row.total {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--line);
  font-family: Fraunces, Georgia, serif;
  font-size: 1.25rem;
}

.fine {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.form-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 700;
}

#whatsapp-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

#send-order {
  width: 100%;
  min-height: 3.35rem;
}

#send-order:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-whatsapp, .btn-mail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 3.35rem;
  padding: 0.8rem 1.1rem;
}

.btn-whatsapp {
  background: #16A34A;
  color: white;
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.34);
  font-size: 1rem;
}
.btn-whatsapp svg { width: 1.25rem; height: 1.25rem; }
.btn-mail { background: white; color: var(--ink); border: 1px solid var(--line); }
.btn-whatsapp:disabled, .btn-mail:disabled { opacity: 0.6; cursor: wait; }
.btn-whatsapp:disabled { box-shadow: none; cursor: not-allowed; }

.cart-dock {
  position: fixed;
  z-index: 45;
  left: 1rem;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  min-height: 3.3rem;
  padding: 0.45rem 0.55rem 0.45rem 1rem;
  border: 0;
  border-radius: 999px;
  background: #0F172A;
  color: white;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.28);
}

.cart-dock[data-store="costco"] {
  background: linear-gradient(100deg, #1E3A8A 0%, #1E3A8A 55%, #DC2626 100%);
}

.cart-dock[data-store="sams"] {
  background: linear-gradient(100deg, #0284C7 0%, #0284C7 55%, #16A34A 100%);
}

.cart-dock b {
  display: grid;
  place-items: center;
  min-width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: white;
  color: #0F172A;
  font-size: 0.8rem;
}

body.cart-open .cart-dock {
  opacity: 0;
  pointer-events: none;
}

.toast {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: calc(6.2rem + env(safe-area-inset-bottom));
  max-width: min(92vw, 24rem);
  transform: translateX(-50%) translateY(8px);
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 0.88rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.store-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: end center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.55);
}

.store-modal-card {
  width: min(100%, 28rem);
  margin-bottom: 0.5rem;
  background: white;
  border-radius: 1.25rem;
  padding: 1.25rem 1.2rem 1.1rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.store-modal-card h2 { margin: 0; font-size: 1.45rem; }

.store-modal-card p {
  margin: 0.7rem 0 0;
  color: #334155;
  font-size: 0.98rem;
}

.store-modal-actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.store-modal-actions .btn-mail,
.store-modal-actions .btn-primary {
  flex: 1;
  width: auto;
  min-height: 2.8rem;
}

@media (min-width: 640px) {
  .store-modal { place-items: center; }
  .store-modal-card { margin-bottom: 0; }
}

.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--line);
}

.site-footer a { color: var(--accent); }

.is-bump { animation: bump 0.35s ease; }

@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1023px) {
  .ticket { display: none !important; }
}

@media (min-width: 768px) {
  .only-desktop { display: block; }
  .only-mobile { display: none !important; }
}

@media (max-width: 767px) {
  .brand-name,
  .brand-city {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .account-button,
  .cart-button {
    height: 2.75rem;
  }

  .cart-button {
    width: 2.75rem;
    min-width: 2.75rem;
    justify-content: center;
    padding: 0;
    gap: 0;
  }

  .cart-button span.label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .cart-button strong {
    position: absolute;
    top: -0.28rem;
    right: -0.28rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0;
    font-size: 0.68rem;
  }
}

@media (max-width: 380px) {
  .segmented button { padding: 0.4rem 0.55rem; font-size: 0.78rem; }
  .account-button { max-width: 6.6rem; padding: 0 0.65rem; font-size: 0.78rem; }
}

@media (min-width: 480px) {
  .catalog-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
  .catalog-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .cart-dock { left: auto; width: 22rem; right: 1.5rem; }
}

@media (min-width: 1100px) {
  .catalog-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (hover: hover) {
  .product-card { transition: transform 0.25s ease, box-shadow 0.25s ease; }
  .product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.18);
  }
  .product-card:hover img { transform: scale(1.045); }
}

.header-actions {
  display: flex;
  align-items: center;
  flex: none;
  gap: 0.45rem;
}

.account { position: relative; }

.account-button {
  height: 2.75rem;
  max-width: 11rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  font-size: 0.84rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 50;
  width: 14rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: white;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

.account-hello {
  margin: 0.35rem 0.55rem 0.45rem;
  font-weight: 700;
}

.account-menu button,
.account-menu a {
  display: block;
  width: 100%;
  padding: 0.65rem 0.7rem;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
  font-weight: 650;
}

.account-menu button:hover,
.account-menu a:hover { background: #F1F5F9; }

.auth-card { width: min(100%, 32rem); }

.profile-card {
  width: min(100%, 42rem);
  max-height: min(90dvh, 56rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (min-width: 1024px) {
  .profile-card {
    width: min(100%, 54rem);
    max-height: min(92dvh, 60rem);
    padding: 1.6rem 1.8rem 1.5rem;
  }
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 639px) {
  #profile-modal { padding: 0.6rem; }
  .profile-card { padding: 1.05rem 0.9rem 1rem; }
  .profile-form { padding: 0.9rem 0.8rem 1rem; }
  .profile-actions .btn-primary { min-height: 3.2rem; }
}

.profile-form {
  margin-top: 1rem;
  padding: 1.1rem 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: #F8FAFC;
}

.profile-form .field { margin-bottom: 0.9rem; }

.profile-form .field input,
.profile-form .field select,
.profile-form .field textarea { min-height: 2.9rem; padding: 0.7rem 0.9rem; }

.profile-form .field textarea { min-height: 4.6rem; }

.profile-loyalty {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: #F1F5F9;
}

.auth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-head h2 { margin: 0; }

.auth-card .field { margin-bottom: 0.85rem; }

.auth-submit { width: 100%; margin-top: 0.2rem; }

.auth-switch { margin-top: 0.85rem; }

.loyalty-banner {
  margin: 0 0 0.9rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.95rem;
  background: #DCFCE7;
  color: #14532D;
  font-weight: 700;
}

.loyalty-track {
  height: 0.6rem;
  margin-top: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: #E2E8F0;
}

.loyalty-track span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #0284C7, #16A34A);
}

.profile-subtitle {
  margin: 1.15rem 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.order-history {
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-groups { display: grid; gap: 0.85rem; }

.order-group h4 {
  display: flex;
  justify-content: space-between;
  margin: 0 0 0.15rem;
  font-size: 0.95rem;
}

.order-group h4 span {
  color: var(--muted);
  font-size: 0.78rem;
}

.order-empty {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.order-detail {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

#order-history { margin-top: 1rem; }

.order-history li {
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
}

.order-history h4 { margin: 0; font-size: 0.95rem; }

.order-history p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.82rem; }

.order-status {
  display: inline-flex;
  margin-top: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #E0F2FE;
  color: #0C4A6E;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.order-status[data-status="pendiente"] { background: #FEF3C7; color: #92400E; }
.order-status[data-status="aceptado"] { background: #DBEAFE; color: #1E3A8A; }
.order-status[data-status="en_tienda"] { background: #EDE9FE; color: #5B21B6; }
.order-status[data-status="armado"] { background: #D1FAE5; color: #065F46; }
.order-status[data-status="en_camino"] { background: #CFFAFE; color: #155E75; }
.order-status[data-status="completado"] { background: #DCFCE7; color: #14532D; }
.order-status[data-status="cancelado"] { background: #FEE2E2; color: #991B1B; }

.admin-status {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.admin-status select {
  flex: 1;
  min-height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: white;
  padding: 0 0.5rem;
}

@media (max-width: 420px) {
  .account-button { max-width: 7.2rem; padding: 0 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

#catalogo { scroll-margin-top: 5.5rem; }

.category-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.category-all {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.category-all[aria-pressed="true"] { color: var(--ink); }

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem 0.55rem;
  margin-bottom: 1.5rem;
}

.category-tile {
  scroll-margin-top: 11rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: center;
}

.category-orb {
  display: grid;
  place-items: center;
  width: min(100%, 8.6rem);
  aspect-ratio: 1;
  border-radius: 999px;
  background: #eeeeee;
  overflow: hidden;
}

.category-orb img {
  width: 76%;
  height: 76%;
  object-fit: contain;
}

.category-tile[aria-pressed="true"] .category-orb {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--accent);
}

.category-tile[aria-pressed="true"] .category-label { color: var(--accent); }

.category-label {
  display: block;
  max-width: 11rem;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.25;
}

.subcat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
}

.product-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
}

.product-topline .product-cat { min-width: 0; }

.compare-check {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  flex: none;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.compare-check input {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  accent-color: var(--accent);
}

.product-media-btn {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #f8fafc;
  cursor: zoom-in;
}

.product-media-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.45s ease;
}

.badge, .promo { pointer-events: none; }

.product-name { min-height: 0; }

.product-name-btn {
  display: -webkit-box;
  width: 100%;
  min-height: 3.7rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  cursor: pointer;
}

.product-name-btn:hover { color: var(--accent); }

.detail-modal,
.compare-modal { place-items: center; align-items: center; }

.detail-card,
.compare-card {
  position: relative;
  width: min(100%, 58rem);
  max-height: min(92dvh, 52rem);
  overflow: auto;
  background: white;
  border-radius: 1.25rem;
  padding: 1rem 1rem 1.15rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.compare-card { width: min(100%, 68rem); }

.detail-close { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2; }

.detail-layout {
  display: grid;
  gap: 1rem;
}

.zoom-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 1.1rem;
  background: #f1f5f9;
  cursor: zoom-in;
  touch-action: manipulation;
}

.zoom-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: white;
  transform: scale(1);
  transform-origin: center center;
  transition: transform 0.12s ease-out;
  pointer-events: none;
}

.zoom-stage.is-zoomed { cursor: zoom-out; }

.zoom-stage.is-zoomed .zoom-hint { opacity: 0; }

.zoom-stage.is-zoomed img { transform: scale(2.6); }

.zoom-hint {
  position: absolute;
  left: 0.7rem;
  bottom: 0.7rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  pointer-events: none;
}

.detail-info { padding-right: 2.2rem; }

.detail-title {
  margin: 0.35rem 0 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.15;
}

.detail-info .product-price { margin-top: 0.85rem; font-size: 1.8rem; }

.detail-qty { margin-top: 0.9rem; }

.detail-info .btn-add { max-width: 18rem; }

.detail-about {
  margin: 1.15rem 0 0.35rem;
  font-size: 0.95rem;
}

.detail-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.compare-scroll { margin-top: 0.85rem; overflow-x: auto; }

.compare-table {
  width: 100%;
  min-width: 40rem;
  border-collapse: separate;
  border-spacing: 0;
}

.compare-table th,
.compare-table td {
  padding: 0.75rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  text-align: left;
}

.compare-table thead th { border-bottom-width: 2px; }

.compare-table tbody th {
  position: sticky;
  left: 0;
  width: 8.2rem;
  background: white;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.compare-shot {
  display: block;
  width: 6.5rem;
  height: 6.5rem;
  object-fit: contain;
  border-radius: 0.8rem;
  background: #f8fafc;
}

.compare-name {
  display: block;
  max-width: 12rem;
  margin-top: 0.45rem;
  font-size: 0.88rem;
  line-height: 1.3;
}

.compare-price {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.25rem;
}

.compare-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.compare-actions .btn-add {
  width: auto;
  min-width: 10.5rem;
  height: 2.4rem;
  margin-top: 0;
  padding: 0 0.9rem;
}

.compare-tray,
.compare-reopen {
  position: fixed;
  z-index: 48;
  left: 50%;
  bottom: calc(0.75rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
}

.compare-tray {
  width: min(52rem, calc(100% - 1.25rem));
  padding: 0.75rem 0.9rem 0.85rem;
  border-radius: 1rem;
}

.compare-tray-top,
.compare-tray-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.compare-tray p { margin: 0; font-weight: 700; }

.compare-slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0.65rem 0 0.75rem;
}

.compare-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 6.4rem;
  padding: 0.35rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.75rem;
  background: #f8fafc;
}

.compare-slot.is-empty { background: #fff; }

.compare-slot img {
  width: 4.4rem;
  height: 3.6rem;
  object-fit: contain;
}

.compare-slot button,
.compare-clear,
.compare-reopen {
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 700;
}

.compare-tray .btn-primary {
  height: 2.45rem;
  padding: 0 1.15rem;
}

.compare-tray .btn-primary:disabled {
  opacity: 0.45;
  cursor: default;
}

.compare-reopen {
  width: auto;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font-size: 0.9rem;
}

body.has-compare { padding-bottom: calc(12.5rem + env(safe-area-inset-bottom)); }

body.has-dock .compare-tray,
body.has-dock .compare-reopen { bottom: calc(5.2rem + env(safe-area-inset-bottom)); }

body.has-dock.has-compare { padding-bottom: calc(17rem + env(safe-area-inset-bottom)); }

body.cart-open .compare-tray,
body.modal-open .compare-tray,
body.cart-open .compare-reopen,
body.modal-open .compare-reopen {
  opacity: 0;
  pointer-events: none;
}

.aisle-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.aisle-crumb button {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-weight: 700;
}

.catalog-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.facet-toggle {
  height: 2.4rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  font-weight: 700;
}

.aisle {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.aisle-filters {
  background: white;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.85rem 0.95rem 1rem;
}

.aisle-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.aisle-filters-head h2 {
  margin: 0;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.facet-group { margin-top: 0.95rem; }

.facet-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  margin: 0 0 0.4rem;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.98rem;
  font-weight: 700;
  text-align: left;
}

.facet-rule {
  flex: none;
  width: 1.15rem;
  height: 2px;
  border-radius: 99px;
  background: #334155;
}

.facet-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.45rem 0.65rem;
  margin: 0.38rem 0;
  font-size: 0.9rem;
  line-height: 1.3;
  cursor: pointer;
}

.facet-option input {
  margin-top: 0.15rem;
  accent-color: var(--accent);
}

.facet-count { color: var(--muted); }

.facet-more,
.facet-reset {
  margin-top: 0.45rem;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-size: 0.82rem;
  font-weight: 700;
}

.facet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 65;
  border: 0;
  background: rgba(15, 23, 42, 0.46);
}

@media (max-width: 899px) {
  body.filters-open { overflow: hidden; }
  .aisle-filters { display: none; }
  #facet-close { display: inline-grid; place-items: center; }

  body.filters-open .aisle-filters {
    display: block;
    position: fixed;
    z-index: 70;
    top: max(0.7rem, env(safe-area-inset-top));
    left: 0.7rem;
    right: 0.7rem;
    bottom: auto;
    width: auto;
    max-height: calc(100dvh - 1.5rem - env(safe-area-inset-bottom));
    overflow: auto;
    border: 0;
    border-radius: 0.85rem;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.28);
    padding: 0.9rem 1rem 1.05rem;
  }

  body.filters-open .aisle-filters-head h2 {
    font-size: 1.2rem;
    font-weight: 700;
  }

  body.filters-open #facet-close {
    width: 2.2rem;
    height: 2.2rem;
    border: 1.5px solid #64748b;
    background: white;
    color: #0f172a;
    font-size: 1.35rem;
  }
}

@media (min-width: 900px) {
  .facet-toggle,
  #facet-close,
  .facet-backdrop { display: none !important; }

  .aisle { grid-template-columns: 16rem minmax(0, 1fr); gap: 1.4rem; }

  .aisle-filters {
    position: sticky;
    top: 6.2rem;
    max-height: calc(100dvh - 7.4rem);
    overflow: auto;
  }

  .aisle .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
  .aisle .catalog-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 699px) {
  #catalogo {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    overflow-x: clip;
  }

  .catalog-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .catalog-tools {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    width: 100%;
  }

  .catalog-tools label { min-width: 0; }

  .sort-select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .aisle .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .product-card { border-radius: 0.95rem; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1); }

  .product-body { padding: 0.5rem 0.55rem 0.65rem; }

  .product-cat { letter-spacing: 0.04em; font-size: 0.6rem; }

  .product-name { min-height: 0; font-size: 0.82rem; }

  .product-name-btn {
    min-height: 2.15rem;
    font-size: 0.82rem;
    -webkit-line-clamp: 2;
  }

  .product-meta { font-size: 0.72rem; }

  .product-price { font-size: 1.02rem; }

  .price-row { margin-top: 0.4rem; gap: 0.3rem; }

  .qty button { width: 1.65rem; height: 1.65rem; }

  .btn-add { height: 2.25rem; margin-top: 0.4rem; font-size: 0.84rem; }

  .compare-check { font-size: 0.68rem; }

  .compare-slot { min-height: 4.5rem; padding: 0.25rem; }

  .compare-slot img { width: 2.6rem; height: 2.2rem; }

  .compare-tray { padding: 0.6rem 0.7rem 0.7rem; }

  body.has-compare { padding-bottom: calc(10.5rem + env(safe-area-inset-bottom)); }

  body.has-dock.has-compare { padding-bottom: calc(15rem + env(safe-area-inset-bottom)); }
}

@media (min-width: 640px) {
  .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.35rem 0.8rem; }
  .category-label { font-size: 0.88rem; }
}

@media (min-width: 800px) {
  .detail-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
    gap: 1.25rem;
  }

  .detail-info { padding-top: 0.35rem; }
}

@media (min-width: 1024px) {
  .category-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .category-orb { width: min(100%, 9.4rem); }
}

@media (hover: hover) {
  .category-tile:hover .category-orb { transform: translateY(-2px); }
  .category-orb { transition: transform 0.2s ease, box-shadow 0.2s ease; }
}

.launch {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.46);
}

.launch-card {
  width: min(100%, 28rem);
  max-height: min(92vh, 44rem);
  overflow: auto;
  padding: 1.6rem 1.4rem 1.35rem;
  border-radius: 1.4rem;
  background: #fff;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  border-top: 4px solid var(--ember);
}

.launch-logo {
  width: 8.5rem;
  height: 8.5rem;
  margin: 0 auto;
  border-radius: 999px;
  object-fit: cover;
  background: #111;
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--accent);
}

.launch-kicker {
  margin: 0.9rem 0 0;
  color: var(--ember);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.launch-card h2 {
  margin: 0.2rem 0 0;
  color: var(--accent);
  font-size: 2rem;
}

.launch-welcome {
  margin: 0.7rem 0 0;
  font-weight: 700;
}

.launch-card p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.launch-card .btn-primary {
  width: 100%;
  margin-top: 1.15rem;
  min-height: 3rem;
}
