:root {
    --green: #0c831f;
    --green-dark: #086318;
    --green-soft: #e8f6ea;
    --ink: #1a1a1a;
    --muted: #667085;
    --line: #ececec;
    --bg: #f4f6f5;
    --card: #fff;
    --off: #1d4ed8;
    --bad: #c81e1e;
    --warn: #b45309;
    --shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Nunito, "Segoe UI", sans-serif;
    padding-bottom: 84px;
}
body.has-dock { padding-bottom: 148px; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, p { margin-top: 0; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.skip {
    position: absolute; left: 12px; top: -40px; background: var(--green); color: #fff;
    padding: 8px 12px; border-radius: 8px; z-index: 80;
}
.skip:focus { top: 8px; }
.wrap { width: min(1180px, calc(100% - 24px)); margin: 0 auto; }

.site-header {
    position: sticky; top: 0; z-index: 40; background: #fff;
    border-bottom: 1px solid var(--line);
}
.header-top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    min-height: 64px;
    padding: 8px 0;
}
.search { grid-column: 1 / -1; }
.logo { display: flex; gap: 8px; align-items: center; text-decoration: none; }
.logo-mark {
    width: 38px; height: 38px; border-radius: 12px; background: var(--green); color: #fff;
    display: grid; place-items: center; font-weight: 800;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text small { color: var(--muted); font-size: 11px; }
.deliver-bar { background: #f3fbf4; border-bottom: 1px solid var(--line); }
.deliver-bar.needs-pin { background: #fef3c7; }
.deliver-open {
    border: 0; background: transparent; padding: 8px 0; cursor: pointer; text-align: left;
    display: flex; flex-direction: column; line-height: 1.15; max-width: 100%;
}
.deliver-open span { color: var(--muted); font-size: 12px; font-weight: 800; }
.deliver-open strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-dialog {
    border: 0; border-radius: 16px; padding: 0; width: min(440px, calc(100% - 24px));
    box-shadow: 0 16px 50px rgba(0, 0, 0, .18);
}
.loc-dialog::backdrop { background: rgba(17, 24, 39, .45); }
.loc-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 8px; }
.loc-head h2 { font-size: 1.15rem; margin: 0; }
.loc-close { border: 0; background: transparent; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); }
.loc-search { display: flex; gap: 8px; align-items: center; padding: 0 16px 12px; flex-wrap: wrap; }
.loc-search .btn { padding: 9px 12px; }
.loc-or { color: var(--muted); font-weight: 800; font-size: 13px; }
.loc-search input {
    flex: 1; min-width: 160px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.loc-note { margin: 0 16px 12px; color: var(--warn); font-weight: 700; }
.loc-list { max-height: 280px; overflow: auto; }
.loc-place {
    width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); background: #fff;
    padding: 12px 16px 12px 42px; cursor: pointer; position: relative;
}
.loc-place::before {
    content: ""; position: absolute; left: 16px; top: 16px; width: 16px; height: 16px;
    border: 2px solid #9ca3af; border-radius: 50%;
}
.loc-place.on::before { border-color: var(--green); box-shadow: inset 0 0 0 4px var(--green); }
.loc-place strong, .loc-place span { display: block; }
.loc-place span { color: var(--muted); font-size: 13px; }
.loc-place:hover { background: #f3fbf4; }
.loc-empty { margin: 0; padding: 12px 16px; color: var(--muted); font-weight: 700; }
.search { position: relative; display: flex; background: #f3f4f6; border-radius: 12px; overflow: visible; }
.search input {
    flex: 1; border: 0; background: transparent; padding: 11px 12px; outline: none; min-width: 0;
}
.search button {
    border: 0; background: var(--green); color: #fff; font-weight: 800; padding: 0 14px; border-radius: 0 12px 12px 0;
}
.suggest {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff;
    border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 50; overflow: hidden;
}
.suggest a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; text-decoration: none; }
.suggest a:hover { background: var(--green-soft); }
.suggest .all { color: var(--green); font-weight: 800; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.header-link, .header-cart {
    text-decoration: none; font-weight: 800; background: #f3f4f6; border-radius: 999px; padding: 8px 12px;
}
.header-cart { position: relative; }
.count {
    position: absolute; top: -6px; right: -6px; background: var(--green); color: #fff;
    border-radius: 999px; min-width: 18px; height: 18px; font-size: 11px; display: grid; place-items: center; padding: 0 4px;
}
.simple-title { font-weight: 800; }
.cat-nav { border-top: 1px solid #f6f6f6; }
.cat-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 10px; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-scroll a {
    flex: 0 0 auto; text-decoration: none; background: #fff; border: 1px solid var(--line);
    border-radius: 999px; padding: 6px 10px; font-weight: 700; font-size: 14px; display: flex; gap: 6px; align-items: center;
}
.cat-scroll a:hover { border-color: var(--green); color: var(--green-dark); }

.alert-ok, .alert-bad, .alert-warn {
    margin: 12px 0; padding: 12px 14px; border-radius: 12px; font-weight: 700;
}
.alert-ok { background: var(--green-soft); color: var(--green-dark); }
.alert-bad { background: #fee2e2; color: var(--bad); }
.alert-warn { background: #fef3c7; color: var(--warn); }
.errors { margin: 12px 0 0; padding-left: 18px; color: var(--bad); }

.hero { display: grid; gap: 14px; padding: 16px 0 8px; }
.hero-copy, .hero-kit, .panel, .bill, .pcard, .info-card, .account-card {
    background: var(--card); border: 1px solid var(--line); border-radius: 16px;
}
.hero-copy { padding: 20px; }
.eyebrow { color: var(--green); font-weight: 800; margin-bottom: 6px; }
.hero h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; }
.lede { color: var(--muted); }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-kit { padding: 16px; display: grid; gap: 6px; text-decoration: none; background: linear-gradient(180deg, #f3fbf4, #fff); }
.hero-kit span { font-size: 42px; }
.price { font-weight: 800; }
.was { color: var(--muted); text-decoration: line-through; font-weight: 600; margin-left: 6px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border-radius: 12px; padding: 11px 16px; font-weight: 800; text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-line { background: #fff; color: var(--green); border-color: var(--green); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.section { padding: 8px 0 18px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.section-head h2 { font-size: 1.25rem; font-weight: 800; margin: 0; }
.section-head a { color: var(--green); font-weight: 800; text-decoration: none; }

.trust { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-bottom: 20px; }
.trust div { background: #fff; border-radius: 14px; padding: 12px; border: 1px solid var(--line); }
.trust strong { display: block; }
.trust span { color: var(--muted); font-size: 13px; }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pcard { position: relative; padding: 8px 8px 12px; }
.wish-form { position: absolute; top: 12px; right: 12px; z-index: 3; margin: 0; }
.wish {
    width: 34px; height: 34px; border: 0; border-radius: 50%; background: #fff; color: #9ca3af;
    box-shadow: 0 1px 4px rgba(0,0,0,.12); cursor: pointer; font-size: 18px; line-height: 1;
}
.wish.on { color: #e11d48; }
.pcard-media {
    position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; text-decoration: none;
}
.media-link { position: absolute; inset: 0; display: grid; place-items: center; text-decoration: none; border-radius: 12px; }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.emoji { font-size: 52px; }
.pcard-action { position: absolute; right: 8px; bottom: 8px; z-index: 2; }
.pcard-action form { margin: 0; }
.btn-add, .qty-stepper {
    min-width: 74px; height: 34px; border-radius: 8px; font-weight: 800;
}
.btn-add { background: #fff; color: var(--green); border: 1px solid var(--green); cursor: pointer; }
.qty-stepper { display: flex; align-items: center; justify-content: space-between; background: var(--green); color: #fff; overflow: hidden; }
.qty-stepper button { width: 26px; height: 34px; border: 0; background: transparent; color: #fff; font-weight: 800; cursor: pointer; }
.qty-stepper span { min-width: 16px; text-align: center; }
.pcard-body h3 { font-size: 14px; line-height: 1.3; min-height: 36px; font-weight: 800; }
.pcard-body h3 a { text-decoration: none; }
.unit, .stock { color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.stock.out { color: var(--bad); font-weight: 800; }
.price-row { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; }
.price-row strong { font-size: 15px; }
.price-row s { color: #98a2b3; font-size: 12px; }
.off { color: var(--off); font-size: 12px; font-weight: 800; }

.kit-grid, .cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kit-card, .cat-tile {
    display: block; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; text-decoration: none;
}
.kit-card .big, .cat-tile .big { font-size: 32px; }
.kit-card strong, .cat-tile strong { display: block; margin: 4px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.page-head { padding: 16px 0 8px; }
.page-head h1 { font-size: 1.6rem; font-weight: 800; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters select, .field input, .field select, .field textarea, .inline-stock {
    border: 1px solid #d0d5dd; border-radius: 10px; padding: 10px 12px; background: #fff; width: 100%;
}
.filters select { width: auto; }
.check { display: flex; gap: 6px; align-items: center; font-weight: 700; }

.layout { display: grid; gap: 14px; }
.panel, .bill, .account-card, .info-card { padding: 16px; }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line .thumb {
    width: 64px; height: 64px; border-radius: 12px; display: grid; place-items: center; font-size: 30px; text-decoration: none;
}
.line-actions { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.line-actions input[type="number"] { width: 72px; }
.linkish, .text-btn {
    background: none; border: 0; color: var(--bad); font-weight: 800; padding: 0; cursor: pointer; text-decoration: none;
}
.totals { margin: 0; }
.totals div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.totals .grand { font-size: 1.15rem; font-weight: 800; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.chip {
    border: 1px dashed var(--green); background: var(--green-soft); color: var(--green-dark);
    border-radius: 999px; padding: 4px 10px; font-weight: 800; font-size: 13px; cursor: pointer;
}
.empty { background: #fff; border-radius: 16px; padding: 28px 16px; text-align: center; border: 1px solid var(--line); }
.pay-box { text-align: center; padding: 12px 0 4px; }
.pay-box .amount { font-size: 2rem; font-weight: 800; }

.product-page { display: grid; gap: 16px; padding: 16px 0 24px; }
.product-hero {
    min-height: 240px; border-radius: 18px; display: grid; place-items: center; font-size: 92px;
}
.product-hero img { width: 100%; height: 320px; object-fit: cover; border-radius: 18px; }
.qty-row { display: flex; gap: 8px; align-items: center; }
.qty-row input { width: 80px; }

.account-grid, .stat-grid, .two { display: grid; gap: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.stat span { color: var(--muted); font-weight: 700; }
.stat strong { display: block; font-size: 1.4rem; }
.menu-list { display: grid; gap: 8px; }
.menu-list a, .order-card {
    display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-decoration: none;
}
.order-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.timeline { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.timeline li { padding-left: 16px; border-left: 3px solid #e5e7eb; color: var(--muted); }
.timeline li.done, .timeline li.now { border-color: var(--green); color: var(--ink); font-weight: 800; }
.log-list { padding-left: 18px; color: var(--muted); }
.log-list li { margin: 8px 0; }
.pill { display: inline-flex; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 800; background: #eef2ff; color: #1e3a8a; }
.pill-ok { background: var(--green-soft); color: var(--green-dark); }
.pill-warn { background: #fef3c7; color: var(--warn); }
.pill-bad { background: #fee2e2; color: var(--bad); }
.pill-info { background: #e0f2fe; color: #075985; }
.table-wrap { overflow-x: auto; background: #fff; border-radius: 14px; border: 1px solid var(--line); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { font-size: 12px; color: var(--muted); }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 88px 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.bar { height: 10px; background: #e5e7eb; border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--green); }

.field { display: grid; gap: 6px; margin-bottom: 12px; font-weight: 700; }
.field span, .field label { font-size: 14px; }
.help { font-weight: 600; }
.demo-box { background: #f3fbf4; border: 1px dashed var(--green); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.pager { display: flex; gap: 6px; justify-content: center; padding: 16px 0; }
.pager a { min-width: 36px; text-align: center; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; font-weight: 800; }
.pager a.on { background: var(--green); color: #fff; border-color: var(--green); }

.bulk-list { display: grid; gap: 8px; }
.bulk-item {
    display: grid; grid-template-columns: 1fr 88px; gap: 8px; align-items: center;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px;
}
.bulk-total { position: sticky; bottom: 74px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-top: 12px; }

.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 22px 0 10px; margin-top: 12px; }
.footer-grid { display: grid; gap: 16px; }
.footer-grid a { display: block; color: var(--muted); text-decoration: none; margin-top: 4px; }
.footer-base { color: var(--muted); font-size: 13px; padding: 12px 0; }

.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: #fff;
    border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); height: 62px;
}
.bottom-nav a { text-decoration: none; text-align: center; font-size: 11px; font-weight: 800; color: #475467; padding-top: 6px; }
.bottom-nav span { display: block; font-size: 16px; }
.cart-dock {
    position: fixed; left: 12px; right: 12px; bottom: 72px; z-index: 46;
    background: var(--green); color: #fff; border-radius: 14px; padding: 12px 14px;
    display: flex; justify-content: space-between; align-items: center; text-decoration: none; font-weight: 800;
}
.cart-dock[hidden] { display: none !important; }
.dock-btn { background: #fff; color: var(--green-dark); border-radius: 8px; padding: 6px 10px; }
.toast-msg {
    position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%) translateY(8px);
    background: #111; color: #fff; padding: 10px 14px; border-radius: 999px; opacity: 0; pointer-events: none;
    transition: .2s ease; z-index: 70; font-weight: 700;
}
.toast-msg.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.invoice { background: #fff; border-radius: 16px; padding: 16px; }
@media print {
    .site-header, .site-footer, .bottom-nav, .cart-dock, .no-print { display: none !important; }
    body { background: #fff; padding: 0; }
}

@media (min-width: 768px) {
    .header-top { grid-template-columns: auto minmax(220px, 1fr) auto; }
    .search { grid-column: auto; }
    .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .hero { grid-template-columns: 1.5fr .8fr; align-items: stretch; }
    .trust, .kit-grid { grid-template-columns: repeat(4, 1fr); }
    .cat-grid { grid-template-columns: repeat(4, 1fr); }
    .layout { grid-template-columns: 1.4fr .8fr; align-items: start; }
    .bill { position: sticky; top: 92px; }
    .product-page { grid-template-columns: .9fr 1.1fr; align-items: start; }
    .account-grid, .stat-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
    .two { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
    .product-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 992px) {
    body, body.has-dock { padding-bottom: 28px; }
    .bottom-nav { display: none; }
    .cart-dock { bottom: 16px; left: auto; right: 24px; width: min(420px, calc(100% - 48px)); }
    .bulk-total { bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .toast-msg { transition: none; }
}
.print-choice { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.print-choice label { border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px 14px; font-weight: 800; background: #fff; }
.print-total { font-size: 1.6rem; font-weight: 800; margin: 8px 0; }
