:root {
  --ink: #0B2D5B;
  --ink-soft: #52647b;
  --line: #dbe3ec;
  --line-strong: #c8d3df;
  --surface: #ffffff;
  --surface-soft: #f6f8fb;
  --surface-blue: #EEF5FF;
  --blue: #3B82F6;
  --blue-dark: #0B2D5B;
  --green: #0a8f55;
  --green-soft: #e8f7ef;
  --red: #b73939;
  --shadow: 0 12px 34px rgba(11, 45, 91, 0.08);
  --radius: 16px;
  --radius-small: 11px;
  --max-width: 1560px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface-soft);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto auto minmax(280px, 1fr) auto auto;
  align-items: center;
  gap: 22px;
  min-height: 86px;
  padding: 14px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}

.brand { display: inline-flex; align-items: center; min-width: 0; color: inherit; }
.brand-logo { display: block; width: 272px; max-width: 100%; height: auto; }
.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; }

.location-control,
.account-button,
.icon-button,
.inline-control,
.text-action,
.category-card {
  border: 0;
  background: transparent;
  cursor: pointer;
}
.location-control { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; white-space: nowrap; }
.location-control .icon { color: var(--blue); }

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
}
.search-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12); }
.search-box .icon { flex: none; color: var(--ink-soft); }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-box input::placeholder { color: #8190a3; }

.desktop-nav { display: flex; align-items: center; gap: 24px; }
.nav-link { position: relative; padding: 14px 0; font-weight: 650; color: #29405f; white-space: nowrap; }
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: transparent; }
.nav-link:hover, .nav-link.is-active { color: var(--blue); }
.nav-link.is-active::after { background: var(--blue); }
#tiendas, #categorias, #pedido, #seguimiento { scroll-margin-top: 150px; }

.account-button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; background: var(--surface); }
.account-button:hover { border-color: var(--blue); color: var(--blue); }

.page-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 22px;
  width: min(var(--max-width), calc(100% - 48px));
  margin: 24px auto 48px;
}
.content-column { min-width: 0; display: grid; gap: 20px; }
.order-column { display: grid; align-content: start; gap: 20px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.96fr);
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.hero-copy { align-self: center; padding: 44px 46px; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.hero h1 { max-width: 720px; margin: 0; font-size: clamp(34px, 4vw, 56px); line-height: 1.04; letter-spacing: -0.035em; }
.hero-copy > p:not(.eyebrow) { max-width: 650px; margin: 20px 0 0; color: var(--ink-soft); font-size: 18px; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 0 20px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 800; }
.button-primary { color: #fff; background: var(--blue); }
.button-primary:hover:not(:disabled) { background: var(--blue-dark); }
.button-secondary { border-color: var(--line-strong); background: #fff; }
.button-secondary:hover { border-color: var(--blue); color: var(--blue); }
.button:disabled { cursor: not-allowed; opacity: 0.52; }
.button-full { width: 100%; }

.hero-map { position: relative; min-height: 320px; overflow: hidden; background: #edf2f7; }
.map-road { position: absolute; background: #fff; box-shadow: 0 0 0 1px #d9e1e9; }
.road-a { width: 130%; height: 34px; left: -15%; top: 34%; transform: rotate(-13deg); }
.road-b { width: 40px; height: 140%; left: 50%; top: -20%; transform: rotate(8deg); }
.road-c { width: 110%; height: 28px; left: -5%; top: 70%; transform: rotate(7deg); }
.map-block { position: absolute; border: 1px solid #d4dce5; background: #e2e8ef; }
.block-a { width: 130px; height: 90px; left: 9%; top: 10%; }
.block-b { width: 155px; height: 105px; right: 8%; top: 11%; }
.block-c { width: 180px; height: 88px; left: 18%; bottom: 8%; }
.map-pin { position: absolute; display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; color: #fff; box-shadow: 0 6px 20px rgba(16, 36, 63, 0.18); }
.pin-a { left: 39%; top: 31%; background: var(--blue); }
.pin-b { right: 20%; bottom: 24%; background: var(--green); }
.coverage-note { position: absolute; right: 24px; bottom: 24px; display: grid; gap: 3px; max-width: 220px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,0.96); }
.coverage-note span { color: var(--ink-soft); font-size: 13px; }

.category-section,
.stores-section,
.principles,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.category-section, .stores-section { padding: 24px; }
.section-heading, .panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-heading.compact { align-items: center; }
.section-heading h2, .panel-heading h2 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.section-heading > div > p:not(.eyebrow) { margin: 8px 0 0; color: var(--ink-soft); line-height: 1.5; }
.text-action { padding: 7px 4px; color: var(--blue); font-weight: 750; }
.text-action:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-action.danger { color: var(--red); }
.result-count { margin: 6px 0 0; color: var(--ink-soft); font-size: 13px; white-space: nowrap; }

.category-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.category-card { display: grid; justify-items: center; gap: 9px; min-height: 96px; padding: 14px 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-weight: 700; }
.category-card:hover { border-color: var(--blue); }
.category-card.is-selected { border-color: var(--blue); color: var(--blue); background: var(--surface-blue); }
.category-symbol { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 9px; color: #fff; background: var(--ink); font-weight: 900; }
.category-card:nth-child(2) .category-symbol { background: var(--green); }
.category-card:nth-child(3) .category-symbol { background: #ba6c17; }
.category-card:nth-child(4) .category-symbol { background: #7756bd; }
.category-card:nth-child(5) .category-symbol { background: #397d3f; }
.category-card:nth-child(6) .category-symbol { background: #a66b00; }

.store-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.store-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; transition: transform .16s ease, border-color .16s ease; }
.store-card:hover { transform: translateY(-2px); border-color: #b6c6d7; }
.store-visual { position: relative; display: grid; min-height: 118px; place-items: center; background: #eef2f6; border-bottom: 1px solid var(--line); }
.store-visual-mark { display: grid; width: 62px; height: 62px; place-items: center; border: 1px solid #cbd6e1; border-radius: 15px; background: #fff; font-size: 23px; font-weight: 900; letter-spacing: 0.02em; }
.open-badge { position: absolute; top: 10px; right: 10px; padding: 5px 8px; border-radius: 999px; color: #08643d; background: var(--green-soft); font-size: 11px; font-weight: 800; }
.open-badge.is-closed { color: #8f2c2c; background: #fbeaea; }
.store-body { padding: 15px; }
.store-body h3 { margin: 0; font-size: 17px; }
.store-category { margin: 5px 0 0; color: var(--ink-soft); font-size: 13px; }
.store-meta { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 13px; color: var(--ink-soft); font-size: 12px; }
.store-meta span { display: inline-flex; align-items: center; gap: 5px; }
.store-meta .icon { width: 15px; height: 15px; }
.store-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 15px; }
.delivery-state { color: #087444; font-size: 12px; font-weight: 750; }
.store-button { min-height: 36px; padding: 0 12px; border: 1px solid var(--blue); border-radius: 8px; color: var(--blue); background: #fff; cursor: pointer; font-weight: 800; }
.store-button:hover { color: #fff; background: var(--blue); }
.empty-state { margin-top: 20px; padding: 34px; border: 1px dashed var(--line-strong); border-radius: 12px; text-align: center; }
.empty-state span { display: block; margin-top: 6px; color: var(--ink-soft); }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; }
.principles article { display: flex; gap: 12px; padding: 20px; }
.principles article + article { border-left: 1px solid var(--line); }
.principles .icon { flex: none; width: 27px; height: 27px; color: var(--blue); }
.principles div { display: grid; gap: 4px; }
.principles span { color: var(--ink-soft); font-size: 13px; line-height: 1.35; }

.panel { padding: 22px; }
.cart-panel { position: static; }
.policy-note { display: grid; gap: 4px; margin-top: 18px; padding: 13px 14px; border-left: 3px solid var(--blue); background: var(--surface-blue); }
.policy-note strong { color: var(--blue-dark); font-size: 13px; }
.policy-note span { color: var(--ink-soft); font-size: 12px; line-height: 1.4; }
.cart-list { display: grid; gap: 12px; margin-top: 16px; }
.cart-empty { padding: 26px 0 10px; color: var(--ink-soft); text-align: center; }
.merchant-order { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.merchant-order-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.merchant-order-identity { min-width: 0; display: flex; align-items: center; gap: 10px; }
.merchant-order-identity > div:last-child { min-width: 0; display: grid; gap: 2px; }
.merchant-order-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.merchant-order-identity span { color: var(--ink-soft); font-size: 11px; }
.merchant-order-total { white-space: nowrap; font-size: 14px; }
.merchant-avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 10px; color: #fff; background: var(--ink); font-size: 12px; font-weight: 900; }
.merchant-order-lines { display: grid; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 11px 13px; }
.cart-line + .cart-line { border-top: 1px solid var(--line); }
.cart-line-copy { min-width: 0; display: grid; gap: 3px; }
.cart-line-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.cart-line-copy span { color: var(--ink-soft); font-size: 11px; }
.quantity-controls { display: inline-grid; grid-template-columns: 28px 28px 28px; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.quantity-controls button { width: 28px; height: 30px; border: 0; background: #fff; cursor: pointer; font-weight: 850; }
.quantity-controls button:hover { color: var(--blue); background: var(--surface-blue); }
.quantity-controls span { text-align: center; font-size: 12px; font-weight: 800; }
.cart-line-side { display: grid; justify-items: end; gap: 4px; min-width: 78px; }
.cart-line-side strong { font-size: 12px; }
.remove-cart-item { border: 0; background: transparent; color: var(--red); cursor: pointer; font-size: 11px; font-weight: 750; }
.merchant-order-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border-top: 1px solid var(--line); background: #fbfcfe; }
.merchant-order-notes { min-width: 0; display: grid; gap: 5px; }
.minimum-state { font-size: 11px; font-weight: 750; line-height: 1.3; }
.minimum-state.is-ready { color: var(--green); }
.minimum-state.is-pending { color: #8a5b00; }
.delivery-ok { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-size: 11px; font-weight: 750; }
.delivery-ok .icon { width: 14px; height: 14px; }
.merchant-review-button { min-height: 32px; padding: 0 10px; border: 1px solid var(--blue); border-radius: 7px; color: var(--blue); background: #fff; cursor: pointer; font-size: 11px; font-weight: 800; }
.merchant-review-button:hover { color: #fff; background: var(--blue); }
.cart-overview { display: grid; gap: 9px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.cart-overview > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink-soft); font-size: 12px; }
.cart-overview > div strong { color: var(--ink); font-size: 12px; }
.cart-overview .cart-overview-total { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; }
.cart-overview .cart-overview-total strong { font-size: 21px; }
.checkout-boundary { display: grid; gap: 12px; margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.checkout-boundary > div { display: grid; gap: 4px; }
.checkout-boundary > div strong { font-size: 12px; }
.checkout-boundary > div span { color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.inline-control { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; text-align: left; cursor: pointer; font-size: 12px; font-weight: 700; }
.nav-link-cart { display: inline-flex; align-items: center; gap: 6px; }
.nav-count { display: inline-grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; border-radius: 999px; color: #fff; background: var(--blue); font-size: 10px; font-weight: 850; }

.status-chip { padding: 6px 9px; border-radius: 999px; color: #075c94; background: #e5f4ff; font-size: 11px; font-weight: 850; }
.tracking-order { display: flex; align-items: center; gap: 11px; margin-top: 17px; }
.tracking-order > div:last-child { display: grid; gap: 3px; }
.tracking-order span { color: var(--ink-soft); font-size: 12px; }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; margin: 24px 0 0; list-style: none; }
.timeline li { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; }
.timeline li::after { content: ""; position: absolute; z-index: 0; top: 7px; left: 50%; width: 100%; height: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li > span { position: relative; z-index: 1; width: 16px; height: 16px; border: 3px solid #fff; border-radius: 50%; background: #b8c4d1; box-shadow: 0 0 0 1px #b8c4d1; }
.timeline li.is-done > span { background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.timeline li.is-done::after { background: var(--green); }
.timeline li.is-current > span { background: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.timeline li div { display: grid; gap: 2px; }
.timeline strong { font-size: 11px; }
.timeline small { color: var(--ink-soft); font-size: 10px; }
.route-map { position: relative; height: 160px; margin-top: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #edf2f7; }
.street { position: absolute; background: #fff; box-shadow: 0 0 0 1px #d8e0e8; }
.street.horizontal { left: -10%; width: 120%; height: 18px; transform: rotate(-4deg); }
.street.horizontal.one { top: 30%; }
.street.horizontal.two { top: 72%; transform: rotate(5deg); }
.street.vertical { top: -10%; width: 18px; height: 120%; transform: rotate(8deg); }
.street.vertical.one { left: 30%; }
.street.vertical.two { left: 68%; transform: rotate(-5deg); }
.route-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.route-line { fill: none; stroke: var(--blue); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 7 6; }
.route-origin { fill: var(--green); stroke: #fff; stroke-width: 3; }
.route-delivery { fill: var(--blue); stroke: #fff; stroke-width: 3; }
.arrival-card { position: absolute; right: 12px; bottom: 12px; display: grid; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.96); font-size: 11px; }
.arrival-card strong { margin-top: 2px; font-size: 16px; }


.tracking-section {
  display: grid;
  grid-template-columns: minmax(340px, .82fr) minmax(0, 1.18fr);
  grid-template-areas:
    "heading heading"
    "details map";
  gap: 26px 30px;
  width: min(var(--max-width), calc(100% - 48px));
  margin: 0 auto 48px;
  padding: 28px;
  scroll-margin-top: 120px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.tracking-heading { grid-area: heading; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.tracking-heading h2 { margin: 0; font-size: 26px; letter-spacing: -0.02em; }
.tracking-heading p:not(.eyebrow) { max-width: 700px; margin: 8px 0 0; color: var(--ink-soft); line-height: 1.5; }
.tracking-details { grid-area: details; display: grid; align-content: start; gap: 28px; min-width: 0; }
.tracking-section .tracking-order { margin-top: 0; }
.tracking-section .timeline { margin: 0; }
.tracking-section .route-map { grid-area: map; height: 270px; margin-top: 0; align-self: stretch; }

.mobile-nav { display: none; }
.app-dialog { width: min(480px, calc(100% - 30px)); padding: 0; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); box-shadow: 0 28px 80px rgba(16,36,63,.24); }
.app-dialog::backdrop { background: rgba(8, 20, 34, .42); }
.dialog-header { display: flex; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; font-size: 21px; }
.dialog-meta { margin: 5px 0 0; color: var(--ink-soft); font-size: 12px; }
.icon-button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }
.dialog-body { padding: 22px; color: var(--ink-soft); line-height: 1.55; }
.dialog-body strong { color: var(--ink); }
.dialog-note { padding: 12px; border-left: 3px solid var(--blue); background: var(--surface-blue); font-size: 13px; }
.catalog-dialog { width: min(980px, calc(100% - 36px)); max-height: min(860px, calc(100vh - 40px)); overflow: auto; }
.catalog-dialog-header { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px; border-bottom: 1px solid var(--line); background: #fff; }
.merchant-dialog-heading { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 16px; min-width: 0; }
.merchant-dialog-mark { display: grid; width: 72px; height: 72px; place-items: center; border: 1px solid #cbd6e1; border-radius: 16px; background: #f4f7fb; color: var(--ink); font-size: 23px; font-weight: 900; letter-spacing: .02em; }
.merchant-dialog-copy { min-width: 0; }
.merchant-dialog-copy h2 { margin: 2px 0 0; font-size: 26px; line-height: 1.1; }
.merchant-dialog-status { position: static; align-self: center; justify-self: start; }
.merchant-dialog-close { flex: none; }
.merchant-service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: #fbfcfe; }
.merchant-service-grid > div { display: grid; gap: 5px; padding: 15px 22px; }
.merchant-service-grid > div + div { border-left: 1px solid var(--line); }
.merchant-service-grid span { color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.merchant-service-grid strong { color: var(--ink); font-size: 13px; line-height: 1.35; }
.catalog-toolbar { position: sticky; top: 0; z-index: 2; display: grid; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.98); }
.catalog-search { max-width: 520px; }
.catalog-filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.catalog-filter { flex: none; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; color: var(--ink-soft); font-size: 12px; font-weight: 750; }
.catalog-filter:hover, .catalog-filter.is-selected { border-color: var(--blue); color: var(--blue); background: var(--surface-blue); }
.catalog-status { margin: 18px 22px 0; padding: 10px 12px; border-left: 3px solid var(--blue); background: var(--surface-blue); color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.catalog-status.is-warning { border-left-color: var(--red); background: #fdf0f0; color: #7d3434; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 18px 22px 22px; }
.product-card { display: grid; grid-template-columns: 62px minmax(0, 1fr); grid-template-rows: auto auto; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.product-mark { grid-row: 1 / 3; display: grid; width: 62px; height: 62px; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: #f3f6fa; color: var(--ink); font-size: 20px; font-weight: 900; }
.product-copy { min-width: 0; }
.product-category { color: var(--blue); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.product-copy h3 { margin: 4px 0 0; font-size: 15px; }
.product-copy p { margin: 4px 0 0; color: var(--ink-soft); font-size: 11px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.product-footer strong { font-size: 14px; }
.product-actions { display: flex; align-items: center; gap: 7px; }
.product-detail-button { min-height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); background: #fff; cursor: pointer; font-size: 11px; font-weight: 800; }
.product-detail-button:hover { border-color: var(--blue); color: var(--blue); background: var(--surface-blue); }
.add-product-button { min-height: 34px; padding: 0 11px; border: 1px solid var(--blue); border-radius: 8px; color: #fff; background: var(--blue); cursor: pointer; font-size: 11px; font-weight: 850; }
.add-product-button:hover:not(:disabled) { background: var(--blue-dark); }
.add-product-button:disabled { border-color: var(--line); color: var(--ink-soft); background: #f3f5f7; cursor: not-allowed; }
.catalog-empty { margin: 0 22px 22px; padding: 24px; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--ink-soft); text-align: center; font-size: 13px; }

.merchant-share-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 22px 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; }
.merchant-share-copy { min-width: 0; display: grid; gap: 4px; }
.merchant-share-copy span { color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.merchant-share-copy strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.merchant-share-actions { display: flex; flex: none; gap: 8px; }
.merchant-share-actions .button { min-height: 38px; padding: 0 13px; font-size: 12px; }
.merchant-share-link { display: inline-flex; align-items: center; gap: 7px; }
.merchant-share-link .icon { width: 16px; height: 16px; }

.product-detail-dialog { width: min(620px, calc(100% - 30px)); }
.product-detail-header { align-items: flex-start; }
.product-detail-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.product-detail-mark { display: grid; width: 62px; height: 62px; flex: none; place-items: center; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: #f3f6fa; font-size: 22px; font-weight: 900; }
.product-detail-body { display: grid; gap: 18px; padding: 22px; }
.product-detail-copy { display: grid; gap: 10px; }
.product-detail-copy p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.product-availability { width: fit-content; padding: 6px 9px; border-radius: 999px; color: #087444; background: var(--green-soft); font-size: 11px; font-weight: 800; }
.product-availability.is-unavailable { color: #8f2c2c; background: #fbeaea; }
.product-detail-purchase { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; }
.product-detail-price, .product-detail-total { display: grid; gap: 4px; }
.product-detail-total { justify-items: end; text-align: right; }
.product-detail-price span, .product-detail-total span { color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.product-detail-price strong, .product-detail-total strong { color: var(--ink); font-size: 20px; }
.product-detail-quantity { display: grid; grid-template-columns: 38px 42px 38px; align-items: center; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; }
.product-detail-quantity button { height: 40px; border: 0; color: var(--ink); background: #fff; cursor: pointer; font-size: 18px; font-weight: 800; }
.product-detail-quantity button:hover { color: var(--blue); background: var(--surface-blue); }
.product-detail-quantity strong { text-align: center; font-size: 13px; }
.product-detail-add { width: 100%; }

.order-review-dialog { width: min(640px, calc(100% - 30px)); }
.order-review-body { display: grid; gap: 18px; padding: 22px; }
.order-review-lines { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; }
.order-review-line { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 14px; }
.order-review-line + .order-review-line { border-top: 1px solid var(--line); }
.order-review-line > div { display: grid; gap: 3px; min-width: 0; }
.order-review-line > div strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.order-review-line span { color: var(--ink-soft); font-size: 11px; }
.order-review-line > strong { flex: none; font-size: 13px; }
.order-review-summary { display: grid; gap: 8px; padding: 14px; border-radius: 10px; background: #f7f9fc; }
.order-review-summary > div { display: flex; justify-content: space-between; gap: 16px; color: var(--ink-soft); font-size: 12px; }
.order-review-summary strong { color: var(--ink); }
.order-review-summary .order-review-total-row { margin-top: 3px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); font-size: 13px; }
.order-review-summary .order-review-total-row strong { font-size: 15px; }
.order-review-fields { display: grid; gap: 12px; }
.order-review-fields label { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 12px; }
.order-review-fields label > span { font-size: 12px; font-weight: 800; }
.order-review-fields select, .order-review-fields input { min-height: 42px; width: 100%; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); background: #fff; font: inherit; font-size: 12px; font-weight: 650; }
.order-review-submit { width: 100%; }
.order-review-submit:disabled { cursor: not-allowed; opacity: .58; }
.account-preview { display: grid; gap: 16px; }
.account-preview > p { margin: 0; }
.account-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.account-preview-grid article { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.account-preview-grid article > strong { color: var(--ink); }
.account-preview-grid article > span { min-height: 52px; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.account-preview-grid button { min-height: 38px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); background: #f7f9fc; font-weight: 800; }
.toast { position: fixed; z-index: 90; right: 24px; bottom: 24px; max-width: 360px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; box-shadow: var(--shadow); font-size: 13px; font-weight: 650; }

:focus-visible { outline: 3px solid rgba(59, 130, 246, .28); outline-offset: 2px; }

@media (max-width: 1320px) {
  .site-header { grid-template-columns: auto auto minmax(240px, 1fr) auto; row-gap: 6px; }
  .desktop-nav { grid-column: 1 / -1; justify-content: center; border-top: 1px solid var(--line); }
  .nav-link { padding-block: 10px; }
  .page-shell { grid-template-columns: minmax(0, 1fr) 380px; }
  .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 980px) {
  body { padding-bottom: 70px; }
  .site-header { grid-template-columns: auto 1fr auto; min-height: 72px; padding: 12px 18px; }
  .desktop-nav { display: none; }
  .location-control { display: none; }
  .account-button span { display: none; }
  .search-box { grid-column: 1 / -1; grid-row: 2; }
  .page-shell { grid-template-columns: 1fr; width: min(100% - 28px, 780px); margin-top: 18px; }
  .order-column { grid-row: auto; }
  .tracking-section { grid-template-columns: 1fr; grid-template-areas: "heading" "details" "map"; width: min(100% - 28px, 780px); padding: 22px; }
  .tracking-heading { align-items: flex-start; }
  .tracking-section .route-map { height: 220px; }
  .cart-panel { position: static; }
  .hero { grid-template-columns: 1fr; }
  .hero-map { min-height: 240px; }
  .principles { grid-template-columns: 1fr; }
  .principles article + article { border-left: 0; border-top: 1px solid var(--line); }
  .mobile-nav { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); min-height: 62px; border-top: 1px solid var(--line); background: rgba(255,255,255,.98); }
  .mobile-nav a, .mobile-nav button { display: grid; place-items: center; border: 0; background: transparent; color: #334a66; font-size: 11px; font-weight: 750; }
  .mobile-nav a.is-active { color: var(--blue); background: var(--surface-blue); }
}

@media (max-width: 640px) {
  .site-header { padding-inline: 14px; }
  .brand-logo { width: 230px; }
  .hero-copy { padding: 30px 24px; }
  .hero h1 { font-size: 38px; }
  .hero-copy > p:not(.eyebrow) { font-size: 16px; }
  .category-section, .stores-section, .panel { padding: 18px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .store-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; }
  .cart-line { grid-template-columns: minmax(0, 1fr) auto; }
  .cart-line-side { grid-column: 1 / -1; grid-template-columns: 1fr auto; align-items: center; justify-items: stretch; }
  .cart-line-side strong { justify-self: start; }
  .cart-line-side .remove-cart-item { justify-self: end; }
  .merchant-order-footer { align-items: flex-start; flex-direction: column; }
  .product-grid { grid-template-columns: 1fr; padding-inline: 16px; }
  .catalog-toolbar, .catalog-dialog-header { padding-inline: 16px; }
  .catalog-status { margin-inline: 16px; }
  .catalog-toolbar { top: 92px; }
  .order-review-fields label { grid-template-columns: 1fr; gap: 6px; }
  .account-preview-grid { grid-template-columns: 1fr; }
  .tracking-heading { flex-direction: column; gap: 12px; }
  .timeline strong { font-size: 10px; }
  .route-map { height: 145px; }
  .tracking-section { padding: 18px; }
  .toast { left: 14px; right: 14px; bottom: 78px; max-width: none; }
}

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


@media (max-width: 700px) {
  .catalog-dialog { width: calc(100% - 18px); max-height: calc(100vh - 18px); }
  .catalog-dialog-header { padding: 18px 16px; }
  .merchant-dialog-heading { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
  .merchant-dialog-mark { width: 56px; height: 56px; border-radius: 13px; font-size: 18px; }
  .merchant-dialog-copy h2 { font-size: 21px; }
  .merchant-dialog-status { grid-column: 2; justify-self: start; }
  .merchant-share-bar { align-items: stretch; margin: 0 16px 16px; flex-direction: column; }
  .merchant-share-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .merchant-share-actions .button { width: 100%; }

  .merchant-service-grid { grid-template-columns: 1fr; }
  .merchant-service-grid > div { padding: 11px 16px; }
  .merchant-service-grid > div + div { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .product-actions { width: 100%; }
  .product-actions > button { flex: 1; }
  .product-footer { align-items: flex-start; flex-direction: column; }
  .product-detail-purchase { grid-template-columns: 1fr; align-items: stretch; }
  .product-detail-total { justify-items: start; text-align: left; }
  .product-detail-quantity { width: fit-content; }
}

/* v0.7.0 — per-merchant delivery and checkout preview */
.inline-control.is-static { display: flex; align-items: center; cursor: default; color: var(--ink-soft); background: #fff; }
.order-checkout-section { display: grid; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.order-section-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.order-section-heading > div { display: grid; gap: 3px; }
.order-section-heading span { color: var(--blue); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.order-section-heading h3 { margin: 0; font-size: 16px; }
.order-section-heading small { color: var(--ink-soft); font-size: 11px; }
.fulfillment-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fulfillment-option { display: grid; gap: 5px; min-height: 86px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; text-align: left; cursor: pointer; }
.fulfillment-option strong { font-size: 13px; }
.fulfillment-option span { color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.fulfillment-option:hover { border-color: var(--blue); }
.fulfillment-option.is-selected { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(59, 130, 246, .10); background: var(--surface-blue); }
.delivery-address-block, .pickup-block { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px; border-radius: 10px; background: #f7f9fc; }
.delivery-address-block > div, .pickup-block { color: var(--ink-soft); font-size: 11px; }
.delivery-address-block > div { min-width: 0; display: grid; gap: 3px; }
.delivery-address-block strong, .pickup-block strong { color: var(--ink); font-size: 12px; }
.pickup-block { display: grid; justify-content: stretch; }
.compact-button { min-height: 36px; padding: 0 12px; flex: none; }
.order-payment-field { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 12px; }
.order-payment-field > span { font-size: 12px; font-weight: 800; }
.order-payment-field select { min-height: 42px; width: 100%; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); background: #fff; font: inherit; font-size: 12px; font-weight: 650; }
.checkout-readiness { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--line); }
.checkout-readiness > div { display: grid; gap: 3px; padding: 12px 14px; background: #fff; }
.checkout-readiness span { color: var(--ink-soft); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.checkout-readiness strong { font-size: 12px; }
.checkout-readiness .is-ready { color: var(--green); }
.checkout-readiness .is-pending { color: #a45e00; }
.address-dialog { width: min(560px, calc(100% - 30px)); }
.address-dialog-body { display: grid; gap: 14px; padding: 22px; }
.address-choices { display: grid; gap: 10px; }
.address-choice { display: grid; gap: 4px; width: 100%; padding: 15px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; text-align: left; cursor: pointer; }
.address-choice:hover { border-color: var(--blue); }
.address-choice.is-selected { border-color: var(--blue); background: var(--surface-blue); box-shadow: 0 0 0 2px rgba(59,130,246,.1); }
.address-choice strong { font-size: 13px; }
.address-choice span { color: var(--ink-soft); font-size: 12px; }
@media (max-width: 640px) {
  .fulfillment-options, .checkout-readiness { grid-template-columns: 1fr; }
  .delivery-address-block { align-items: stretch; flex-direction: column; }
  .order-payment-field { grid-template-columns: 1fr; gap: 6px; }
}
