/* Tienda pública: estilos independientes del panel de administración. */
:root {
  color-scheme: light;
  --bg: #fff; --surface: #f6f7f9; --text: #202124; --muted: #62666d;
  --line: #e7e9ed; --red: #da0016; --red-hover: #b90013;
  --selected: #fff1f2; --error: #b00020; --success: #24613d;
  --radius: 18px; --small-radius: 12px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --bar-height: 88px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px; color: var(--text); background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.5; padding-bottom: calc(var(--bar-height) + env(safe-area-inset-bottom)); }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
button, a { color: inherit; }
button { border: 0; }
button, .choice-card { transition: background-color .15s, border-color .15s, color .15s; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible,
[tabindex="-1"]:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
button:active:not(:disabled) { transform: translateY(1px); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 5.8vw, 2.35rem); line-height: 1.2; letter-spacing: -.045em; font-weight: 800; }
h2, legend { font-size: 1.2rem; font-weight: 750; line-height: 1.3; letter-spacing: -.025em; }
h3 { font-size: 1rem; font-weight: 700; line-height: 1.35; }
strong { font-weight: 650; }
.icon { display: inline-block; width: 24px; height: 24px; flex: 0 0 auto; vertical-align: middle; }
.shell { width: min(100% - 40px, 1100px); margin-inline: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 102px; border-bottom: 1px solid var(--line); }
.brand { display: flex; width: 161px; padding-block: 8px; }
.brand img { display: block; width: 100%; height: auto; }
.bag-button { position: relative; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; border-radius: 50%; }
.bag-button:disabled { color: var(--muted); }
.bag-count { position: absolute; top: -4px; right: -5px; min-width: 22px; min-height: 22px; padding: 1px 5px; border-radius: 20px; color: #fff; background: var(--red); font-size: .75rem; font-weight: 700; }
.intro { padding-block: 24px 25px; }
.intro > p:last-child { color: var(--muted); margin-top: 8px; font-size: .95rem; }
.location { display: flex; gap: 5px; align-items: center; color: var(--muted); font-size: .8rem; font-weight: 600; margin-bottom: 12px; }
.location .icon { width: 16px; height: 16px; color: var(--red); }
.categories { display: flex; gap: 8px; overflow-x: auto; padding: 4px 4px 8px; margin: -4px -4px 20px; scrollbar-width: thin; }
.category { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 10px 8px; border-radius: 100px; font-size: .9rem; font-weight: 650; background: var(--surface); }
.category[aria-pressed="true"] { background: var(--red); color: #fff; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-heading > span { color: var(--muted); font-size: .8rem; text-align: right; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.product-photo { aspect-ratio: 1; width: 100%; position: relative; padding: 8px; background: var(--surface); }
.product-photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.photo-placeholder { display: flex; height: 100%; flex-direction: column; gap: 10px; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.photo-placeholder .icon { width: 32px; height: 32px; opacity: .55; }
.photo-placeholder span { font-size: .7rem; }
.product-details { padding: 14px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.product-details h3 { overflow-wrap: anywhere; }
.product-unit { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.product-price { font-size: 1.3rem; font-weight: 750; letter-spacing: -.025em; padding-top: 12px; margin-top: auto; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.pending-price { font-size: .85rem; letter-spacing: 0; }
.quantity { width: 136px; max-width: 100%; flex-shrink: 0; height: 46px; }
.product-card .quantity { width: 100%; }
.add-button { width: 100%; height: 46px; border: 1px solid #f3c4ca; background: var(--selected); color: var(--red); font-weight: 650; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 12px; font-size: .9rem; }
.add-button span { font-size: 1.3rem; font-weight: 400; }
.stepper { display: grid; grid-template-columns: 44px minmax(20px, 1fr) 44px; height: 46px; border: 1px solid #f3c4ca; border-radius: 10px; overflow: hidden; background: var(--selected); color: var(--red); }
.stepper button { height: 44px; min-width: 44px; background: transparent; color: var(--red); font-size: 1.4rem; }
.stepper button:focus-visible { outline-offset: -4px; }
.stepper button:disabled { color: var(--muted); }
.quantity-value { display: flex; align-items: center; justify-content: center; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--text); }
.catalog-section { margin-top: 28px; }
.combo-list { display: grid; gap: 10px; }
.combo-card, .review-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.combo-info, .review-item > div:first-child { min-width: 0; }
.combo-info h3 { font-size: 1.05rem; }
.combo-info p, .review-item p { font-size: .8rem; color: var(--muted); margin: 3px 0 6px; overflow-wrap: anywhere; }
.combo-price { font-size: 1.1rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.delivery-section, .customer-section { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; margin-bottom: 16px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-card { position: relative; cursor: pointer; min-height: 100px; border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px 12px; background: #fff; }
.choice-card > span { display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; font-size: .85rem; font-weight: 650; }
.choice-card input { position: absolute; top: 10px; right: 10px; width: 16px; height: 16px; margin: 0; accent-color: var(--red); }
.choice-card:has(input:checked) { background: var(--selected); border: 2px solid var(--red); padding: 13px 9px 11px; color: var(--red); }
.choice-card:has(input:focus-visible) { outline: 3px solid var(--red); outline-offset: 4px; }
.delivery-help { display: flex; align-items: flex-start; gap: 7px; color: var(--muted); font-size: .8rem; margin-top: 13px; }
.delivery-help .icon { width: 16px; height: 16px; margin-top: 2px; }
.notice { display: flex; align-items: flex-start; gap: 10px; background: var(--surface); border: 1px solid var(--line); padding: 14px 16px; border-radius: var(--small-radius); margin-block: 16px; font-size: .9rem; line-height: 1.5; }
.notice .icon { width: 20px; height: 20px; margin-top: 1px; }
.error-notice { color: var(--error); border-color: #efb6c0; background: var(--selected); }
.success-notice { color: var(--success); background: #f1f8f3; border-color: #d5e7da; }
.shop-content { min-width: 0; }
.order-aside { display: none; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 12px 20px; border-radius: var(--small-radius); background: var(--red); color: #fff; font-weight: 650; text-decoration: none; font-size: .95rem; }
.primary-button:disabled { color: #72757b; background: #eceef1; }
.primary-button .icon { width: 20px; height: 20px; }
.order-bar { position: fixed; z-index: 10; bottom: 0; left: 0; right: 0; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -3px 14px #20212404; }
.order-bar-inner { display: flex; align-items: center; gap: 12px; }
.bar-copy { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.bar-copy strong { font-size: .9rem; line-height: 1.4; }
.bar-copy > span { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.bar-bag { display: flex; }
.order-bar .primary-button { padding-inline: 16px; font-size: .85rem; gap: 8px; white-space: nowrap; }
.shop-footer { padding: 28px 0; margin-top: 12px; text-align: center; font-size: .75rem; color: var(--muted); }
.shop-footer span { padding-inline: 5px; }
.text-button { background: transparent; color: var(--red); padding: 8px 0; min-height: 44px; font-weight: 650; font-size: .85rem; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.text-button .icon { width: 18px; height: 18px; }
.review-intro { padding-top: 8px; }
.step-label { margin: 16px 0 8px; font-weight: 650; font-size: .7rem; color: var(--muted); letter-spacing: .1em; }
.review-items { display: grid; gap: 10px; }
.schedule { margin-top: 28px; }
.extra-fields { background: var(--surface); border-radius: var(--small-radius); padding: 1px 16px 16px; margin-top: 16px; }
.field { margin-top: 20px; }
.field label { display: block; margin-bottom: 8px; font-weight: 650; font-size: .9rem; }
.field label span { font-size: .8rem; font-weight: 400; color: var(--muted); }
.field input, .field textarea { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 50px; border: 1px solid #cdd0d5; border-radius: 10px; background: #fff; padding: 12px; font-size: 16px; color: var(--text); }
.field textarea { resize: vertical; }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field input::placeholder, .field textarea::placeholder { color: #72757b; }
.field-hint, .field-error { font-size: .8rem; line-height: 1.55; margin-top: 8px; color: var(--muted); }
.field-error { color: var(--error); }
.checkout-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); margin-top: 28px; padding-top: 20px; }
.checkout-total > strong { font-size: 1.4rem; font-weight: 750; }
.submit-button { width: 100%; margin-top: 24px; min-height: 54px; }
.submit-help { font-size: .8rem; text-align: center; color: var(--muted); margin-top: 12px; }
body[data-step="review"] { padding-bottom: 0; }
body[data-step="review"] .order-bar { display: none; }
.empty-state { padding: 24px 16px; text-align: center; background: var(--surface); border-radius: var(--radius); font-size: .9rem; color: var(--muted); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 50; padding: 12px; background: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.confirmation-shell { max-width: 520px; margin: 48px auto; padding: 0 24px; text-align: center; }
.confirmation-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 24px auto; background: #f1f8f3; color: var(--success); border-radius: 50%; }
.confirmation-icon .icon { width: 32px; height: 32px; }
.confirmation-shell p { margin-top: 16px; }
.confirmation-details { background: var(--surface); padding: 20px; border-radius: var(--radius); margin-block: 24px; }
.confirmation-shell .primary-button { margin-top: 24px; }
@media (hover: hover) {
  .primary-button:hover:not(:disabled), .category[aria-pressed="true"]:hover { background: var(--red-hover); }
  .add-button:hover, .stepper button:hover:not(:disabled) { background: #ffe2e5; }
  .category:hover:not([aria-pressed="true"]), .bag-button:hover:not(:disabled) { background: #eceef1; }
  .text-button:hover { text-decoration: underline; }
}
@media (max-width: 359px) {
  .shell { width: calc(100% - 32px); }
  .category { padding-inline: 8px; font-size: .85rem; }
  .product-grid { gap: 8px; }
  .product-details { padding: 12px 8px 8px; }
  .product-details h3 { font-size: .9rem; }
  .section-heading > span { display: none; }
  .combo-card, .review-item { gap: 10px; padding: 14px 12px; }
  .combo-card .quantity, .review-item .quantity { width: 114px; }
  .bar-bag { display: none; }
  .order-bar .primary-button { padding-inline: 12px; }
}
@media (min-width: 600px) {
  .shell { width: min(100% - 64px, 1100px); }
  .site-header { min-height: 112px; }
  .brand { width: 180px; }
  .intro { padding-block: 32px; }
  .categories { justify-content: flex-start; }
  .category { flex: 0 0 auto; min-width: 100px; padding-inline: 18px; }
  .product-grid { gap: 20px; }
  .product-details { padding: 20px; }
  .product-details h3 { font-size: 1.15rem; }
  .product-unit { font-size: .9rem; }
  .product-price { font-size: 1.5rem; }
  .choice-card > span { font-size: .95rem; }
  .combo-card { padding: 20px; }
  .combo-info p { font-size: .9rem; }
}
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .shop-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 48px; align-items: start; }
  .order-aside { display: block; position: sticky; top: 24px; border: 1px solid var(--line); border-radius: 20px; padding: 24px; margin-top: 4px; }
  .aside-heading { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; }
  .aside-heading .icon { color: var(--red); }
  #aside-empty { font-size: .85rem; line-height: 1.8; margin-bottom: 24px; }
  .aside-items { list-style: none; margin: 0; padding: 0; }
  .aside-items li { display: flex; gap: 12px; justify-content: space-between; font-size: .8rem; margin-block: 12px; }
  .aside-items li span:first-child { min-width: 0; overflow-wrap: anywhere; }
  .aside-items li span:last-child { flex-shrink: 0; font-weight: 650; }
  .aside-total { padding-top: 20px; border-top: 1px solid var(--line); display: flex; gap: 12px; justify-content: space-between; align-items: center; font-size: .8rem; }
  .aside-total > strong { font-size: 1.35rem; }
  .order-aside .primary-button { margin-top: 20px; width: 100%; }
  .count-help { color: var(--muted); margin-top: 12px; font-size: .7rem; text-align: center; }
  .order-bar { display: none; }
  .intro { padding-block: 36px; }
  .catalog-section { margin-top: 32px; }
  .product-photo { max-height: 260px; }
}
.pause-notice { margin-bottom: 28px; padding: 24px; align-items: flex-start; border: 1px solid #edc6bb; background: #fff5ef; color: #5e2b1d; }
.pause-notice h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.3; }
.pause-notice p { white-space: pre-line; overflow-wrap: anywhere; }
.pause-notice a { display: inline-block; margin-top: 12px; min-height: 44px; padding-block: 10px; color: inherit; font-weight: 600; }
body[data-orders-enabled="false"] .delivery-section,
body[data-orders-enabled="false"] .order-aside,
body[data-orders-enabled="false"] .order-bar,
body[data-orders-enabled="false"] .bag-button { display: none; }
body[data-orders-enabled="false"] .shop-layout { grid-template-columns: minmax(0, 1fr); }
body[data-orders-enabled="false"] { padding-bottom: 0; }
body[data-orders-enabled="false"] .add-button:disabled { opacity: .5; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
