*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); color: var(--text); background: var(--bg); line-height: 1.5; }
img { max-width: 100%; }
a { color: var(--accent); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-text); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.stripe { display: flex; height: 8px; }
.stripe.small { height: 6px; }
.stripe span { flex: 1; }
.stripe span:nth-child(1) { background: var(--stripe-1); }
.stripe span:nth-child(2) { background: var(--stripe-2); }
.stripe span:nth-child(3) { background: var(--stripe-3); }

.preview-banner { background: var(--accent-2); color: var(--accent-2-text); text-align: center; padding: 8px 16px; font-weight: 700; font-size: 14px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.logo img { border-radius: 3px; display: block; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 22px; text-transform: uppercase; }
.logo-sub { font-size: 12px; font-weight: 700; letter-spacing: .28em; color: var(--accent); margin-top: 3px; text-transform: uppercase; }
[data-theme="rasta-roots"] .logo-sub, [data-theme="midnight-jerk"] .logo-sub { color: var(--accent-2); }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; font-weight: 500; }
.main-nav a { color: var(--text); text-decoration: none; }
.main-nav a:hover { text-decoration: underline; }
.cart-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 700; cursor: pointer; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent-2); color: var(--accent-2-text); font-size: 13px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 22px; border: 0; border-radius: calc(var(--radius) * .6); font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-accent { background: var(--accent); color: var(--accent-text); }
.btn-accent2 { background: var(--accent-2); color: var(--accent-2-text); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.wide { width: 100%; min-height: 52px; font-size: 16px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }

/* Hero */
.hero { background: var(--hero-bg); color: var(--hero-text); overflow: hidden; }
[data-theme="midnight-jerk"] .hero { border-bottom: 1px solid var(--border); }
.hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 60px; padding-bottom: 68px; }
.hero-copy { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.pill-badge { align-self: flex-start; padding: 6px 14px; border-radius: 999px; background: var(--accent-2); color: var(--accent-2-text); font-weight: 700; font-size: 13px; letter-spacing: .08em; }
.hero h1 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); text-transform: var(--display-case); font-size: clamp(38px, 6vw, 62px); line-height: 1; letter-spacing: -0.01em; }
.hero h1 em { font-style: normal; color: var(--hero-highlight); }
.hero p { margin: 0; font-size: 18px; color: var(--hero-muted); max-width: 540px; }
.closed-note { background: var(--accent-2); color: var(--accent-2-text); padding: 12px 16px; border-radius: 12px; font-weight: 700; max-width: 540px; }
.order-box { background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; max-width: 540px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
[data-theme="clean-modern"] .order-box { border: 1px solid var(--border); box-shadow: none; }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; padding: 5px; background: var(--surface-2); border-radius: 12px; }
.seg button { min-height: 44px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; cursor: pointer; color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
.hero .mode-note { margin: 0; font-size: 15px; color: var(--muted); }
.hero-flag { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hero-flag img { width: 100%; max-width: 520px; height: auto; border-radius: 14px; box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 30px 60px rgba(0,0,0,.4); }
.hero-flag span { font-family: var(--font-display); font-weight: 800; font-size: 14px; letter-spacing: .3em; color: var(--hero-highlight); text-align: center; }

/* Band */
.band { background: var(--band-bg); color: var(--band-text); }
[data-theme="clean-modern"] .band { border-bottom: 1px solid var(--border); }
.band-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.band-row div { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.band svg { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--band-icon); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Menu */
.menu-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-top: 56px; padding-bottom: 80px; }
.menu-col { flex: 999 1 560px; min-width: 0; }
.section-title { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); text-transform: var(--display-case); font-size: 40px; line-height: 1.1; }
.menu-col > .muted { margin: 6px 0 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chips button { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--border); background: var(--surface); font-weight: 700; cursor: pointer; }
.chips button[aria-pressed="true"] { border-color: var(--text); background: var(--text); color: var(--bg); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; background: var(--surface); }
.card-img { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-img .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.card-img .ph svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.tag { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; background: #111; color: #FED100; font-size: 12px; font-weight: 700; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-size: 18px; }
.card p { margin: 0; font-size: 14px; color: var(--muted); flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.price { font-weight: 700; font-size: 17px; }
.add-btn { min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--accent-2); color: var(--accent-2-text); font-weight: 700; cursor: pointer; }

/* Cart */
.cart { flex: 1 1 320px; min-width: 0; border: 1px solid var(--border); border-radius: calc(var(--radius) + 2px); overflow: hidden; background: var(--surface); position: sticky; top: 90px; }
.cart-inner { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.cart-head { display: flex; align-items: center; gap: 10px; }
.cart-head h2 { margin: 0; flex: 1; font-family: var(--font-display); font-weight: var(--display-weight); text-transform: var(--display-case); font-size: 24px; }
.mode-tag { padding: 5px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 700; }
.cart-close { display: none; }
.line { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.line-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.line-name strong { font-size: 15px; }
.line-name span { font-size: 14px; color: var(--muted); }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-size: 20px; cursor: pointer; }
.qty span { min-width: 22px; text-align: center; font-weight: 700; }
.empty { text-align: center; color: var(--muted); padding: 20px 0; margin: 0; }
.totals { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.totals div { display: flex; justify-content: space-between; gap: 10px; }
.totals .label { color: var(--muted); }
.totals .grand { font-weight: 700; font-size: 19px; padding-top: 8px; border-top: 1px solid var(--border); }
.cart-msg { margin: 0; font-size: 14px; color: var(--muted); }
.cart-msg:empty { display: none; }
.cart-bar { display: none; }

@media (max-width: 899px) {
  .cart { position: fixed; left: 0; right: 0; bottom: 0; top: auto; max-height: 85vh; overflow-y: auto; border-radius: 20px 20px 0 0; z-index: 40; transform: translateY(105%); transition: transform .25s ease; box-shadow: 0 -10px 40px rgba(0,0,0,.25); }
  .cart.open { transform: none; }
  .cart-close { display: inline-flex; }
  .cart-bar:not([hidden]) { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; min-height: 56px; align-items: center; justify-content: space-between; padding: 0 20px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-text); font-weight: 700; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
  .menu-layout { padding-bottom: 110px; }
}

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--footer-text); }
.footer-row { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; padding-top: 48px; padding-bottom: 48px; }
.footer-row > div { flex: 1 1 200px; }
.footer-brand { flex: 1 1 300px !important; display: flex; flex-direction: column; gap: 12px; }
.footer-brand img { border-radius: 6px; }
.footer-brand strong { font-family: var(--font-display); font-weight: var(--display-weight); text-transform: var(--display-case); font-size: 26px; }
.footer-brand span, .site-footer p { color: var(--footer-muted); margin: 0 0 6px; }
.site-footer h3 { margin: 0 0 10px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--hero-highlight); }
[data-theme="clean-modern"] .site-footer h3 { color: var(--accent); }
.site-footer a { color: var(--footer-text); }

/* Checkout dialog */
.checkout { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); border: 0; border-radius: var(--radius); padding: 24px; background: var(--surface); color: var(--text); }
.checkout::backdrop { background: rgba(0,0,0,.55); }
.co-close-row { display: flex; justify-content: flex-end; margin: -8px -8px 0 0; }
.checkout h2 { margin: 0 0 4px; font-family: var(--font-display); font-weight: var(--display-weight); text-transform: var(--display-case); font-size: 28px; }
.co-form { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.co-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
.co-form input, .co-form textarea { min-height: 46px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); font-weight: 400; font-size: 15px; }
.co-form [aria-invalid="true"] { border-color: #d92d20; }
.co-error { color: #d92d20; font-weight: 700; margin: 12px 0; }
[data-theme="rasta-roots"] .co-error, [data-theme="midnight-jerk"] .co-error { color: #ff8a80; }
.co-error:empty { display: none; }
#paypal-buttons { margin-top: 16px; min-height: 50px; }
.fine { font-size: 13px; color: var(--muted); text-align: center; margin: 8px 0 0; }
#co-done-view { text-align: center; padding: 12px 0; }
.done-icon { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: flex; align-items: center; justify-content: center; }
