:root {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #152d24;
  background: #f7f8f3;
  --forest: #123c2a;
  --green: #216145;
  --lime: #d5eea4;
  --white: #fff;
  --muted: #506559;
  --border: #dbe5db;
  --paper: #f7f8f3;
  --shadow: 0 10px 30px #142c2310;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; min-height: 100vh; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { width: 1.2em; height: 1.2em; flex-shrink: 0; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -.035em; }
p { line-height: 1.55; }
small { color: var(--muted); }
:focus-visible { outline: 3px solid #507d3f; outline-offset: 3px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 15; padding: 10px; background: white; }
.shell { width: min(1210px, calc(100% - 56px)); margin-inline: auto; }
#header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.header-inner, .footer-inner { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.header-inner { min-height: 72px; }
.brand, .header-actions { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; border-radius: 13px; width: 42px; height: 42px; background: var(--forest); color: var(--lime); flex: none; }
.brand-mark svg { width: 25px; height: 25px; }
.brand strong { display: block; font-size: 1.35rem; line-height: 1.1; letter-spacing: -.05em; }
.brand small { display: block; font-size: .72rem; }
.admin-link { color: var(--muted); font-weight: 650; font-size: .88rem; padding: 8px; }
.admin-link:hover { color: var(--forest); text-decoration: underline; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 10px 15px; border: 1px solid transparent; border-radius: 10px; font-weight: 700; font-size: .9rem; line-height: 1.2; text-align: center; }
.btn.primary { background: var(--green); color: white; }
.btn.primary:hover { background: var(--forest); }
.btn.secondary { background: white; border-color: var(--border); color: var(--forest); }
.btn.secondary:hover, .btn.icon:hover { background: #edf3ea; }
.btn.quiet, .btn.icon { background: transparent; color: var(--forest); }
.btn.icon { min-width: 44px; padding: 8px; }
.btn.lime { background: var(--lime); color: #143522; }
.btn.lime:hover { background: #e4f6c4; }
#cart-count { border-radius: 50%; background: #ffffff28; min-width: 24px; padding: 4px; }
.store { padding-block: 24px 60px; }
.shipping-strip { background:#e4f3d0; color:#123c2a; text-align:center; padding:12px 16px; border-radius:12px; margin-bottom:18px; font-size:1.12rem; font-weight:850; }
.hero { display: grid; grid-template-columns: 1fr 1fr; min-height: 330px; background: var(--forest); color: white; border-radius: 22px; overflow: hidden; }
.hero-copy { padding: clamp(26px, 4.1vw, 60px); align-self: center; }
.hero-tag, .eyebrow { font-size: .73rem; font-weight: 800; letter-spacing: .12em; }
.hero-tag { display: flex; align-items: center; gap: 8px; color: var(--lime); }
.hero h1 { font-size: clamp(2rem, 4.65vw, 4rem); line-height: .99; margin: 18px 0 14px; letter-spacing: -.06em; }
.hero p { color: #e4ede5; margin-bottom: 22px; }
.hero img { width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: center; }
.hero .hero-logo { object-fit: contain; background: #050505; padding: 14px; }
.offers { margin-block: 30px 35px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 15px; }
.section-head h2 { font-size: clamp(1.35rem, 3.8vw, 2rem); }
.section-head > span { color: var(--muted); font-size: .86rem; }
.stories { display: flex; overflow-x: auto; gap: 18px; padding: 5px 3px 10px; }
.story { border: 0; background: none; padding: 0 4px; color: var(--forest); font-weight: 700; width: 108px; flex: none; text-align: center; font-size: .8rem; }
.story-image { display: block; margin: 0 auto 8px; width: 74px; height: 74px; border: 2px solid #5b8b3d; border-radius: 50%; padding: 4px; }
.story-image img { height: 100%; width: 100%; border-radius: 50%; object-fit: cover; }
.story:hover .story-image { border-color: var(--forest); }
.catalog { scroll-margin-top: 90px; margin-top: 22px; }
.catalog-note { margin: -6px 0 14px; }
.search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 0 11px; color: var(--muted); min-height: 44px; }
.search input { color: var(--forest); background: none; border: 0; min-width: 0; width: 100%; padding: 10px 0; outline: none; }
.search:focus-within { outline: 2px solid #578347; }
.chips, .tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; }
.chip { border: 1px solid var(--border); border-radius: 99px; padding: 8px 15px; min-height: 40px; color: var(--forest); background: white; font-weight: 700; }
.chip.selected { color: white; background: var(--forest); border-color: var(--forest); }
.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.product { background: white; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.product-photo { aspect-ratio: 1.5; position: relative; display: flex; justify-content: center; background: #fff; }
.product-photo img { width: 100%; height: 100%; object-fit: contain; }
.sale { position: absolute; top: 16px; left: -6px; background: #f18435; color: #24190f; padding: 9px 20px 9px 13px; font-weight: 900; font-size: .8rem; box-shadow: 2px 4px 8px #19331e38; clip-path: polygon(0 0,100% 0,88% 50%,100% 100%,0 100%); animation: ribbon-hop .65s cubic-bezier(.2,1.5,.4,1) both, ribbon-bob 2.8s ease-in-out .7s infinite; }
.product-highlight { outline: 4px solid #ed9a38; scroll-margin-top: 100px; }
@keyframes ribbon-hop { 0% { transform:translateY(-35px) scale(.7); opacity:0 } 55% { transform:translateY(6px) scale(1.08) } 100% { transform:translateY(0) scale(1); opacity:1 } }
@keyframes ribbon-bob { 0%, 100% { translate:0 0; } 50% { translate:0 -5px; } }
.whatsapp-float { position:fixed; right:20px; bottom:22px; z-index:7; display:flex; align-items:center; gap:7px; padding:10px 13px; min-height:54px; border-radius:99px; background:#25d366; color:#06391b; font-weight:850; box-shadow:0 8px 22px #102d1744; }
.whatsapp-float svg { width:31px; height:31px; }
.whatsapp-float:hover { background:#50e580; transform:translateY(-2px); }
.category-record { grid-template-columns:minmax(120px,1fr) 110px auto auto; }
.product-body { display: flex; flex-direction: column; align-items: stretch; flex: 1; padding: 15px; border-top: 1px solid #f0f2ed; }
.eyebrow { color: #52713f; }
.product h3 { font-size: 1.3rem; margin: 4px 0; overflow-wrap: anywhere; }
.description { font-size: .87rem; color: var(--muted); flex: 1; overflow-wrap: anywhere; }
.product-price { margin: 12px 0 10px; }
.product-price del, .story-price del { display:block; color:#747d70; font-size:.85rem; margin-bottom:2px; }
.story-prices { display:flex; flex-direction:column; align-items:center; gap:2px; font-size:.8rem; }
.story-prices del { color:#6d7569; }
.story-prices strong { color:#19553a; font-weight:900; }
.product-price strong { font-size: 1.12rem; }
.product-price span { font-size: .83rem; color: var(--muted); }
.product-actions { display: flex; gap: 7px; }
.product-actions .btn { flex: 1; min-width: 0; padding-inline: 6px; }
.qty-input { width: 62px; min-width: 0; }
input:not([type=checkbox]), select, textarea { min-height: 42px; }
.qty-input, .cart-row input, .field input, .field select, .field textarea { border: 1px solid #ccd9cd; border-radius: 9px; background: #fff; color: #172f25; padding: 8px 10px; }
.cart-fixed { display: none; }
footer { border-top: 1px solid var(--border); background: #edf3ea; color: var(--muted); padding: 20px 0; font-size: .84rem; }
.dialog-head { background: white; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); padding: 12px 18px 12px 23px; }
.dialog-head h2 { font-size: 1.55rem; }
dialog { color: var(--forest); background: white; padding: 0; width: min(620px, calc(100% - 30px)); max-height: min(850px, calc(100dvh - 34px)); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 20px 60px #0f241a49; overflow: hidden; }
dialog[open] { display: flex; flex-direction: column; }
dialog.wide { width: min(960px, calc(100% - 30px)); }
dialog.story-full { width: min(560px, 100vw); height: min(900px, 100dvh); max-height: 100dvh; border-radius: 17px; }
dialog.story-full .dialog-body { display:flex; flex-direction:column; padding: 12px; background:#102b20; color:white; }
dialog.story-full .dialog-head { background:#102b20; color:white; border:0; }
dialog.story-full .dialog-head .btn { color:white; }
.story-bars { display:flex; gap:5px; padding:4px 5px 12px; }
.story-bars span { height:5px; flex:1; border-radius:8px; background:#ffffff55; }
.story-bars span.seen { background:#d5eea4; }
dialog.story-full .story-view { display:flex; flex:1; flex-direction:column; background:#174832; color:white; border:0; }
dialog.story-full .story-view > img { flex:1; min-height:0; max-height:none; object-fit:contain; background:#fff; }
dialog.story-full .story-detail { padding:15px; }
.story-actions { display:flex; gap:8px; }
.story-actions .btn { flex:1; min-height:52px; }
dialog.story-full .story-controls { padding:10px 5px 5px; }
dialog.story-full .story-controls .btn { background:#ffffff1c; border-color:#ffffff55; color:white; }
.shipping-cart { margin-top:12px; font-weight:850; color:#23613a; }
.promo-message { display:grid; gap:12px; text-align:center; justify-items:center; padding:20px 8px; }
.promo-message h3 { font-size:clamp(1.65rem,5vw,2.25rem); }
.promo-message p { font-size:1.1rem; }
.promo-message strong { background:#e4f3d0; border-radius:12px; padding:12px; width:100%; font-size:1.15rem; }
.promo-message small { font-size:.8rem; }
.promo-message .btn { width:100%; min-height:54px; }
.promo-emoji { font-size:3.5rem; }
dialog.promo-exit { animation: balloon-out .38s ease-in forwards; }
@keyframes balloon-out { to { transform:scale(.07); opacity:0; } }
dialog.wizard { width: min(690px, calc(100% - 22px)); min-height: min(600px, calc(100dvh - 30px)); }
dialog.wizard .dialog-body { display: flex; flex: 1; padding: 26px; }
.wizard-form { display: flex; flex-direction: column; width: 100%; }
.wizard-count { font-size: .9rem; font-weight: 800; color: var(--green); }
.wizard-progress { display: flex; gap: 7px; margin: 11px 0 25px; }
.wizard-progress span { height: 8px; border-radius: 99px; background: #e6eee4; flex: 1; }
.wizard-progress span.done { background: #77b650; }
.wizard-form h3 { font-size: clamp(2rem, 5vw, 2.9rem); margin: 0 0 24px; }
.wizard-panel { display: grid; align-content: start; gap: 18px; }
.wizard-panel .field { font-size: 1.06rem; gap: 10px; }
.wizard-panel input, .wizard-panel select, .wizard-panel textarea { min-height: 62px; font-size: 1.25rem; border-width: 2px; padding: 14px; }
.wizard-panel textarea { min-height: 82px; }
.wizard-field { display: grid; gap: 16px; }
.wizard-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.wizard-actions .btn { min-height: 56px; font-size: 1.06rem; }
.wizard-actions .btn.primary { min-width: 48%; }
.offer-quick { display:flex; gap:6px; flex-wrap:wrap; }
.offer-quick .btn { font-size:.8rem; padding:8px 10px; }
.success-finish { text-align: center; padding: 12px 10px 22px; }
.success-ring { display: grid; place-items: center; margin: 4px auto 16px; width: 92px; height: 92px; border-radius: 50%; background: #d8f3c6; color: #145534; animation: pop-in .5s ease-out both; }
.success-ring svg { width: 52px; height: 52px; stroke-width: 2.5; }
.success-finish h3 { font-size: 2rem; }
.success-finish p { margin: 8px auto 18px; max-width: 440px; }
.finish-list { text-align: left; display: grid; gap: 9px; max-width: 420px; margin: 0 auto 20px; }
.finish-list div { padding: 10px 14px; background: #eff7e9; border-radius: 9px; font-weight: 650; animation: rise-in .45s ease both; }
.finish-list div:nth-child(2) { animation-delay: .15s; }
.finish-list div:nth-child(3) { animation-delay: .3s; }
.finish-list div:nth-child(4) { animation-delay: .45s; }
@keyframes pop-in { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .success-ring, .finish-list div { animation: none; } }
@media (prefers-reduced-motion: reduce) { .sale, dialog.promo-exit { animation:none; } }
dialog::backdrop { background: #0c2017a3; }
.dialog-body { padding: 20px 23px; overflow: auto; overscroll-behavior: contain; }
.dialog-body h3 { margin-block: 10px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.story-view { background: var(--paper); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.story-view > img { background: white; width: 100%; height: min(34vh, 280px); object-fit: contain; }
.story-detail { padding: 16px; }
.story-detail h3 { font-size: 1.6rem; margin: 0; }
.story-detail strong { font-size: 1.28rem; }
.story-detail .btn { width: 100%; margin-top: 10px; }
.story-controls { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 12px; font-size: .84rem; }
.cart-row { display: grid; grid-template-columns: 52px minmax(0,1fr) 68px auto 44px; gap: 9px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.cart-row img { width: 52px; height: 46px; object-fit: cover; border-radius: 8px; }
.cart-row small, .record small, .history small { display: block; margin-top: 4px; }
.cart-row input { width: 100%; }
.total { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 15px; background: #edf5e6; border-radius: 9px; margin-top: 15px; font-weight: 650; }
.total strong { font-size: 1.25rem; }
.field { display: grid; gap: 5px; min-width: 0; color: var(--forest); font-weight: 650; font-size: .87rem; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; font-weight: 400; font-size: .96rem; }
.field input[type=file] { max-width: 100%; }
.field textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; align-items: start; }
.span-two, .phone-help { grid-column: 1 / -1; }
.field-help, .order-date { font-size: .83rem; color: var(--muted); }
.phone-help { margin-top: -7px; }
.payment-choice { margin-top: 15px; display: grid; gap: 10px; }
.alias-box { display: grid; gap: 6px; padding: 13px; border: 1px solid #b9d8b9; border-radius: 11px; background: #eff8ec; overflow-wrap: anywhere; }
.alias-box span { font-size: .83rem; color: var(--muted); }
.alias-box strong { font-size: 1.15rem; }
.alias-box .btn { justify-self: start; }
.form-error { background: #fff1e9; border: 1px solid #edc6b6; color: #833922; border-radius: 9px; padding: 10px 13px; margin: 12px 0; }
.review-contact { display: grid; gap: 4px; padding: 13px; background: var(--paper); border-radius: 10px; margin-bottom: 10px; overflow-wrap: anywhere; }
.review-lines > div, .history > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.success { text-align: center; padding: 18px; }
.success > svg { color: var(--green); width: 42px; height: 42px; }
.success p, .success .btn { margin-top: 14px; }
#notice { display: none; position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 30px); padding: 12px 16px; background: #173b2a; color: white; border: 1px solid #8eb593; box-shadow: var(--shadow); border-radius: 10px; z-index: 12; }
#notice.visible { display: block; }
.loading, .empty { padding: 14px 0; color: var(--muted); }
.loading { text-align: center; }
.empty-box { padding: 30px; background: #fff; border: 1px dashed #c6d5c6; border-radius: 12px; color: var(--muted); margin: 12px 0; }
.empty-box h3 { color: var(--forest); margin-bottom: 7px; }
.admin { padding-block: 29px 52px; min-height: 70vh; }
.admin-heading { margin-bottom: 17px; }
.admin-heading h1, .login-card h1 { font-size: clamp(1.8rem, 5vw, 3rem); margin: 4px 0; }
.tabs { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.filters { display: grid; grid-template-columns: minmax(190px, 1fr) 145px 160px; gap: 12px; align-items: end; margin-bottom: 15px; }
.customer-search { max-width: 510px; margin-bottom: 14px; }
.record { display: grid; grid-template-columns: 54px minmax(130px, 1.7fr) minmax(92px, .65fr) minmax(74px, .65fr) auto; align-items: center; gap: 12px; padding: 12px; background: white; border: 1px solid var(--border); border-radius: 12px; margin: 7px 0; overflow-wrap: anywhere; }
.record img { width: 54px; height: 45px; object-fit: contain; }
.record .btn { justify-self: end; }
.order-record { grid-template-columns: minmax(112px, .8fr) minmax(128px, 1.4fr) minmax(100px, .65fr) minmax(91px, .65fr) auto; }
.client-record { grid-template-columns: 1fr 1fr auto auto; }
.status { color: #4b5e55; background: #eef0ed; width: fit-content; border-radius: 99px; padding: 5px 9px; font-size: .77rem; font-weight: 700; }
.status.new { color: #784627; background: #fff0d8; }
.status.active { color: #27543b; background: #e8f1e6; }
.login-wrap { padding-block: 46px; min-height: 70vh; }
.login-card { max-width: 455px; margin: auto; padding: 26px; border: 1px solid var(--border); border-radius: 17px; background: #fff; box-shadow: var(--shadow); }
.login-card p { color: var(--muted); margin-bottom: 16px; }
.login-card .btn { margin-top: 13px; width: 100%; }
.toggle { display: flex; align-items: center; gap: 8px; min-height: 43px; font-size: .9rem; }
.toggle input { width: 18px; height: 18px; accent-color: var(--green); }
.history-heading { border-top: 1px solid var(--border); padding-top: 14px; }
.contact-details { border: 1px solid var(--border); border-radius: 10px; margin: 13px 0; padding: 10px; }
.contact-details summary { cursor: pointer; font-weight: 700; padding: 4px; }
.contact-details .form-grid { margin-top: 10px; }
.order-date { margin-bottom: 13px; }
.edit-line { display: grid; grid-template-columns: minmax(130px, 1fr) 90px 95px 130px minmax(82px, auto) 44px; gap: 6px; padding: 9px; background: var(--paper); border-radius: 10px; margin-bottom: 8px; align-items: end; }
.line-subtotal { display: grid; align-content: center; align-self: stretch; gap: 4px; }
.add-line { display: flex; align-items: end; gap: 10px; margin-bottom: 12px; }
.add-line .field { flex: 1; }
.export-tools { border-top: 1px solid var(--border); padding-top: 11px; margin-top: 15px; }
.export-tools p { font-size: .84rem; color: var(--muted); }
.payment-mini { display:block; margin-top:6px; font-weight:750; color:#986120; }
.admin-payment { display:grid; gap:11px; margin:16px 0; padding:18px; border:1px solid #b8dcc3; border-radius:14px; background:#f2faef; }
.admin-payment h3 { margin:0; }
.admin-payment p { color:var(--muted); font-size:.9rem; }
.admin-payment .field { max-width:100%; }
.admin-payment .field input { width:100%; overflow-wrap:anywhere; }
.payment-check { display:grid; gap:10px; padding:12px 14px; border-radius:11px; background:#fff; }
.payment-check .toggle { font-weight:800; font-size:1rem; line-height:1.35; }
.payment-check input { width:23px; height:23px; }
.proof-ready { padding:12px; border-radius:10px; background:#fff; font-weight:700; }
.proof-ready a { color:var(--green); text-decoration:underline; }
.payment-page { display:grid; min-height:75dvh; place-items:center; padding-block:36px; }
.payment-card { width:min(580px,100%); display:grid; gap:18px; padding:clamp(20px,5vw,36px); background:white; border:1px solid var(--border); border-radius:22px; box-shadow:var(--shadow); }
.payment-card h1 { font-size:clamp(2rem,5vw,2.8rem); }
.payment-card p { color:var(--muted); }
.payment-amount { display:flex; justify-content:space-between; gap:15px; align-items:center; padding:18px; background:#e7f3db; border-radius:14px; font-size:1.1rem; }
.payment-amount strong { font-size:1.5rem; white-space:nowrap; }
.payment-card form { display:grid; gap:13px; padding-top:16px; border-top:1px solid var(--border); }
.payment-card input[type=file] { width:100%; min-height:58px; }
.payment-card .btn { min-height:54px; }
.payment-cta { width:100%; }
.payment-card .verified-note { color:#17603a; font-weight:800; }
#print-sheet { display: none; }

@media (max-width: 940px) {
  .products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .edit-line { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .edit-line .field:first-child { grid-column: 1 / -1; }
  .edit-line .btn.icon { grid-column: 4; grid-row: 1; justify-self: end; }
  .edit-line .field:first-child { grid-column: 1 / 4; }
}
@media (max-width: 650px) {
  .shell { width: calc(100% - 28px); }
  .header-inner { min-height: 64px; gap: 5px; }
  .header-actions { gap: 5px; }
  .header-actions .btn { padding: 8px; min-height: 40px; }
  .header-actions .btn > span { display: none; }
  .brand { gap: 7px; }
  .brand-mark { width: 35px; height: 35px; border-radius: 10px; }
  .brand-mark svg { width: 21px; height: 21px; }
  .brand strong { font-size: 1.11rem; }
  .brand small, .admin-link { font-size: .7rem; }
  .admin-link { padding: 5px; }
  .store { padding-block: 13px 76px; }
  .hero { display: flex; flex-direction: column; min-height: 0; border-radius: 16px; }
  .hero-copy { align-self: stretch; padding: 20px 20px 18px; }
  .hero h1 { font-size: clamp(1.8rem, 8.5vw, 2.65rem); margin-top: 12px; }
  .hero p { font-size: .88rem; margin-bottom: 12px; }
  .hero img { height: 125px; object-position: center 53%; }
  .hero .hero-logo { height: 185px; padding: 8px; }
  .offers { margin-block: 20px; }
  .catalog-head { align-items: stretch; flex-direction: column; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-body { padding: 10px; }
  .product h3 { font-size: 1.06rem; }
  .description { font-size: .76rem; }
  .product-price strong { font-size: 1rem; }
  .product-actions { gap: 5px; }
  .product-actions input { width: 45px; padding: 5px; }
  .product-actions .btn { font-size: .8rem; }
  .cart-fixed { display: block; position: fixed; z-index: 6; bottom: 0; inset-inline: 0; padding: 8px 14px max(8px, env(safe-area-inset-bottom)); background: #ffffffef; border-top: 1px solid var(--border); }
  .whatsapp-float { right:12px; bottom:74px; padding:10px; min-height:52px; }
  .whatsapp-float span { display:none; }
  .category-record { grid-template-columns:1fr auto auto; }
  .category-record > span { grid-column:1; grid-row:2; }
  .cart-fixed .btn { width: 100%; min-height: 49px; justify-content: space-between; }
  body:has(.cart-fixed) #notice { bottom: 70px; }
  .footer-inner { flex-wrap: wrap; gap: 4px; padding-bottom: 22px; }
  dialog, dialog.wide { width: calc(100% - 16px); max-height: calc(100dvh - 20px); }
  dialog.story-full { width:100%; max-width:none; height:100dvh; border-radius:0; border:0; }
  dialog.wizard { width: 100%; max-width: none; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; margin: 0; }
  dialog.wizard .dialog-body { padding: 20px; }
  .wizard-form h3 { font-size: 2.3rem; margin-bottom: 12px; }
  .wizard-progress { margin-bottom: 15px; }
  .wizard-actions { margin-top: 13px; }
  .wizard-actions .btn { font-size: .96rem; min-width: 0; }
  .dialog-head { padding: 8px 10px 8px 13px; }
  .dialog-head h2 { font-size: 1.25rem; }
  .dialog-body { padding: 12px; }
  .cart-row { grid-template-columns: minmax(0, 1fr) 55px auto 38px; gap: 4px; font-size: .86rem; }
  .cart-row img { display: none; }
  .cart-row .btn.icon { min-width: 36px; }
  .field input, .field select, .field textarea { font-size: 16px; }
  .filters { grid-template-columns: 1fr 1fr; gap: 7px; }
  .filters .search { grid-column: 1 / -1; }
  .record { grid-template-columns: 41px minmax(70px, 1fr) minmax(57px, auto) auto; gap: 6px; padding: 8px; font-size: .81rem; }
  .record img { width: 41px; height: 38px; }
  .record .status { grid-column: 2; grid-row: 2; }
  .record .btn { padding: 7px; min-height: 38px; }
  .order-record, .client-record { grid-template-columns: minmax(70px, .8fr) minmax(75px, 1.1fr) minmax(60px, .75fr); }
  .order-record .btn, .client-record .btn { grid-column: 3; grid-row: 2; }
  .tabs { gap: 4px; }
  .tabs .chip { padding: 7px 11px; font-size: .82rem; }
  .edit-line { gap: 4px; }
  .edit-line .field { font-size: .7rem; }
  .line-subtotal { font-size: .75rem; overflow-wrap: anywhere; }
}
@media (max-width: 355px) {
  .product-actions { flex-wrap: wrap; }
  .product-actions input, .product-actions .btn { flex: 1 1 100%; }
  .form-grid { grid-template-columns: 1fr; }
}
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: white; color: black; font-size: 11pt; }
  body > :not(#print-sheet) { display: none !important; }
  #print-sheet { display: block; }
  #print-sheet p { margin: 8px 0; }
  #print-sheet table { width: 100%; border-collapse: collapse; margin-top: 15px; }
  #print-sheet thead { display: table-header-group; }
  #print-sheet tr { break-inside: avoid; }
  #print-sheet th, #print-sheet td { text-align: left; padding: 7px; border: 1px solid #aaa; }
}

/* Panel legible y estados verticales */
.admin .record .btn { min-width:104px; min-height:46px; padding:10px 16px; font-size:1rem; line-height:1.25; white-space:normal; word-break:normal; overflow-wrap:normal; }
.admin .record { grid-template-columns:54px minmax(120px,1fr) auto auto auto; }
.admin .record > * { min-width:0; }
.admin .offer-quick { grid-column:1/-1; justify-content:flex-end; }
.admin .category-record { grid-template-columns:minmax(120px,1fr) auto auto auto; }
.admin .status-record { grid-template-columns:54px minmax(120px,1fr) auto; }
.status-preview { width:100px; height:150px; object-fit:cover; border-radius:10px; }
dialog.story-full { padding:0; overflow:hidden; background:#102b20; }
dialog.story-full .dialog-body { height:calc(100% - 58px); min-height:0; padding:8px 12px max(8px,env(safe-area-inset-bottom)); box-sizing:border-box; }
dialog.story-full .story-view { position:relative; min-height:0; border-radius:12px; }
dialog.story-full .story-view > img { position:absolute; inset:0; height:100%; width:100%; object-fit:cover; background:#174832; }
dialog.story-full .story-detail { position:relative; margin-top:auto; z-index:1; padding:70px 20px 22px; background:linear-gradient(transparent,rgba(0,0,0,.88)); text-shadow:0 1px 3px #000; }
dialog.story-full .story-detail .btn { text-shadow:none; min-height:48px; }
dialog.story-full .story-controls { flex-shrink:0; }
@media(max-width:700px) {
 .admin .record, .admin .category-record, .admin .status-record { grid-template-columns:48px minmax(0,1fr); gap:10px; padding:12px; font-size:.95rem; }
 .admin .category-record { grid-template-columns:minmax(0,1fr) auto; }
 .admin .record > .btn, .admin .record > .offer-quick { grid-column:1/-1; grid-row:auto; width:100%; justify-self:stretch; }
 .admin .record .status { grid-row:auto; grid-column:auto; }
 .admin .offer-quick .btn { flex:1 1 120px; }
 dialog.story-full { margin:0; width:100vw; height:100dvh; max-height:100dvh; border-radius:0; }
}

/* Inicio de sesión con llaves de acceso */
.login-card > .btn { width:100%; min-height:52px; margin:12px 0; white-space:normal; font-weight:700; }
.password-fallback { margin-top:18px; padding:14px; border:1px solid #d7e8db; border-radius:14px; }
.password-fallback summary { cursor:pointer; font-weight:650; }
.password-fallback form { margin-top:14px; }
.admin [data-action="passkey-enroll"], .admin [data-action="passkey-revoke"] {
 min-height:44px; padding:11px 16px; white-space:normal; overflow-wrap:normal; word-break:normal;
}
@media (max-width:700px) {
 .admin [data-action="passkey-enroll"], .admin [data-action="passkey-revoke"] { width:100%; grid-column:1/-1; }
}

/* Producto ampliado, promociones por cantidad y estado de stock */
.product-photo-button { display:block; width:100%; height:100%; min-height:150px; padding:0; border:0; background:transparent; cursor:zoom-in; }
.product-photo-button img { width:100%; height:100%; object-fit:contain; transition:transform .22s ease; }
.product-photo-button:hover img { transform:scale(1.04); }
.stock-badge { position:absolute; top:12px; left:12px; background:#b41e2d; color:#fff; font-weight:900; padding:9px 12px; border-radius:10px; box-shadow:0 5px 14px #0003; pointer-events:none; }
.out-of-stock .product-photo img { filter:grayscale(.45); opacity:.72; }
.out-of-stock .product-price { opacity:.7; }
.stock-alert { padding:12px; border:1px solid #f3b3b3; background:#fff1f1; border-radius:12px; color:#8e1f29; margin:10px 0; }
.stock-marquee { overflow:hidden; white-space:nowrap; margin-top:8px; font-size:.9rem; }
.stock-marquee span { display:inline-block; white-space:nowrap; padding-left:100%; animation:stock-scroll 15s linear infinite; }
@keyframes stock-scroll { to { transform:translateX(-100%); } }
.promo-option { padding:12px; border-radius:12px; background:#fff1d6; border:1px solid #f4bd66; display:grid; gap:9px; margin:10px 0; }
.promo-option strong { font-size:1rem; color:#6a3c04; }
.promo-option .btn { width:100%; white-space:normal; word-break:normal; }
.product-body > [data-action="product-detail"] { margin-top:10px; }
.product-detail-dialog { width:min(790px, calc(100vw - 24px)); }
.product-detail-dialog .dialog-body { overflow-y:auto; }
.detail-layout { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); gap:22px; align-items:start; }
.detail-image { min-height:230px; background:#fff; border:1px solid var(--border); border-radius:14px; display:grid; place-items:center; overflow:hidden; }
.detail-image img { max-height:480px; width:100%; object-fit:contain; }
.detail-info { display:grid; gap:12px; padding:12px 3px; }
.detail-price { display:grid; gap:4px; }
.detail-price strong { font-size:1.75rem; }
.detail-action .btn { width:100%; }
.promo-editor { border-top:1px solid var(--border); padding-top:14px; }
.admin .offer-quick { display:flex; flex-wrap:wrap; gap:8px; min-width:min(100%, 190px); }
.admin .offer-quick .btn { min-width:130px; flex:1 1 auto; white-space:normal; word-break:normal; overflow-wrap:normal; }
.admin .status-record > .offer-quick { grid-column:1/-1; }
@media(max-width:650px) {
 .detail-layout { grid-template-columns:1fr; gap:12px; }
 .detail-image { min-height:190px; }
 .detail-image img { max-height:38vh; }
 .product-detail-dialog { max-height:calc(100dvh - 20px); }
 .product-photo-button { min-height:135px; }
 .admin .offer-quick .btn { flex:1 1 135px; }
}
@media(prefers-reduced-motion:reduce) {
 .stock-marquee span { animation:none; padding-left:0; white-space:normal; }
 .stock-marquee { white-space:normal; }
 .product-photo-button img { transition:none; }
}
