:root {
  --red: #0F4D3A;
  --red-dark: #083B2C;
  --red-soft: #F0E6D8;
  --ink: #333333;
  --muted: #716B62;
  --line: #E4D8C7;
  --paper: #FFFFFF;
  --white: #fff;
  --green: #0F4D3A;
  --shadow: 0 16px 42px rgba(51, 51, 51, .08);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #F8F4EA;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #F8F4EA; }
body { min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { max-width: 680px; min-height: 100vh; margin: 0 auto; background: var(--paper); padding-bottom: 92px; }
.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--red); }
.boot-screen span { color: var(--muted); font-size: 13px; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 16px; color: white; background: linear-gradient(145deg, #D26932, var(--red-dark)); font: 800 25px Georgia, serif; box-shadow: 0 10px 24px rgba(15, 77, 58, .22); }
.brand-mark.small { width: 42px; height: 42px; }
.brand-logo { width: 48px; height: 48px; display: block; flex: 0 0 auto; object-fit: contain; border: 1px solid rgba(15,77,58,.16); border-radius: 15px; background: #F8F4EA; box-shadow: 0 9px 22px rgba(15,77,58,.16); }
.brand-logo-compact { width: 48px; height: 48px; border-radius: 14px; }
.brand-logo-large { width: 116px; height: 116px; border-radius: 25px; box-shadow: 0 18px 42px rgba(15,77,58,.25); }
.brand-logo-admin { width: 58px; height: 58px; border-radius: 17px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 18px 10px; background: rgba(255,255,255,.96); border-bottom: 1px solid rgba(234,223,224,.72); backdrop-filter: blur(16px); }
.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-copy strong { display: block; letter-spacing: .12em; font-size: 16px; color: var(--red-dark); }
.brand-copy span { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.icon-button { display: grid; place-items: center; border: 1px solid var(--line); background: white; color: var(--red-dark); border-radius: 50%; width: 44px; min-width: 44px; height: 44px; position: relative; }
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cart-count { position: absolute; right: -6px; top: -6px; background: var(--red); color: white; border: 2px solid white; min-width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.hero { min-height: 224px; margin: 0; padding: 20px; color: var(--ink); overflow: hidden; position: relative; display: grid; place-items: center; border-bottom: 1px solid #E9DFD0; background: #fff; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -45%; background: radial-gradient(circle at center, rgba(255,255,255,.98) 0 14%, rgba(255,255,255,.86) 24%, rgba(255,245,243,.4) 39%, rgba(255,255,255,0) 57%); z-index: 1; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 0; opacity: .38; background-image: radial-gradient(circle, rgba(15,77,58,.26) 0 1.2px, transparent 1.5px); background-size: 29px 29px; mask-image: linear-gradient(90deg, #000, transparent 33%, transparent 67%, #000); }
.hero-copy { position: relative; z-index: 3; min-width: 0; text-align: center; animation: hero-enter .55s cubic-bezier(.2,.8,.2,1) both; }
.hero-copy-centered { width: min(88%, 430px); padding: 24px 16px; }
.hero-copy-centered::before { content: ""; position: absolute; inset: -20px -24px; z-index: -1; border-radius: 50%; background: radial-gradient(ellipse, rgba(255,255,255,.97) 0 38%, rgba(255,255,255,.78) 56%, transparent 72%); }
.hero h1 { margin: 0; color: var(--red-dark); font: 700 clamp(31px, 7vw, 48px)/1 Georgia, serif; letter-spacing: -.035em; text-wrap: balance; }
.floating-kitchenware { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.floating-kitchen-item { position: absolute; display: grid; place-items: center; transform: rotate(var(--brand-rotate, 0deg)); }
.floating-kitchen-item img { display: block; width: 100%; height: 100%; object-fit: contain; opacity: .84; filter: saturate(1.18) contrast(1.08) drop-shadow(0 9px 12px rgba(51,51,51,.24)); will-change: transform, opacity; }
.item-frying-pan { width: 150px; height: 50px; left: 10px; top: 10px; --brand-rotate: -7deg; }
.item-stock-pot { width: 88px; height: 67px; right: 18px; top: 1px; --brand-rotate: 8deg; }
.item-kettle { width: 132px; height: 52px; left: -12px; top: 65px; --brand-rotate: 5deg; }
.item-chef-knife { width: 127px; height: 50px; left: 8px; bottom: 55px; --brand-rotate: -2deg; }
.item-whisk { width: 108px; height: 54px; right: -8px; top: 63px; --brand-rotate: -6deg; }
.item-spatula { width: 124px; height: 44px; left: 20px; bottom: 6px; --brand-rotate: 4deg; }
.item-cutting-board { width: 128px; height: 50px; right: 3px; bottom: 55px; --brand-rotate: 2deg; }
.item-mixing-bowl { width: 140px; height: 56px; right: 10px; bottom: 2px; --brand-rotate: -5deg; }
.floating-kitchen-item:nth-child(odd) img { animation: brand-pulse-in 7.2s ease-in-out infinite; }
.floating-kitchen-item:nth-child(even) img { animation: brand-pulse-out 7.2s ease-in-out infinite; }
.item-stock-pot img { animation-delay: -4.9s !important; }
.item-kettle img { animation-delay: -2.2s !important; }
.item-chef-knife img { animation-delay: -3.8s !important; }
.item-whisk img { animation-delay: -1.3s !important; }
.item-spatula img { animation-delay: -5.5s !important; }
.item-cutting-board img { animation-delay: -2.9s !important; }
.item-mixing-bowl img { animation-delay: -.7s !important; }
.content { padding: 14px 18px 0; }
.search-wrap { position: relative; margin: 0 0 12px; }
.search-wrap input { width: 100%; height: 48px; border: 1px solid #DFD1BE; background: #FFFDF8; border-radius: 15px; padding: 0 16px 0 44px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.search-wrap input:focus { border-color: rgba(15,77,58,.44); background: white; box-shadow: 0 0 0 4px rgba(15,77,58,.06); }
.search-wrap::before { content: "⌕"; position: absolute; left: 16px; top: 8px; font-size: 26px; color: var(--muted); }
.category-list { display: flex; gap: 9px; overflow-x: auto; padding: 2px 1px 12px; scrollbar-width: none; }
.category-list::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--muted); padding: 9px 14px; font-size: 12px; font-weight: 750; }
.chip.active { color: white; background: var(--red); border-color: var(--red); }
.section-head { display: flex; justify-content: space-between; align-items: end; margin: 9px 0 12px; }
.section-head h2 { margin: 0; font: 700 23px Georgia, serif; }
.section-head span { color: var(--muted); font-size: 12px; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.product-card { border-radius: 18px; overflow: hidden; background: white; border: 1px solid #E6DCCF; min-width: 0; box-shadow: 0 8px 24px rgba(51,51,51,.06); }
.product-card { animation: card-enter .42s calc(var(--card-order, 0) * 55ms) ease both; transition: transform .2s ease, box-shadow .2s ease; }
.product-card:active { transform: scale(.985); }
.product-image { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; background: linear-gradient(145deg, #EDE2D1, #FFFDF8); display: block; }
.product-placeholder { display: grid; place-items: center; font: 700 46px Georgia, serif; color: rgba(15,77,58,.25); }
.product-body { padding: 11px; }
.product-category { color: var(--red); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.product-card h3 { font-size: 14px; margin: 6px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-description { color: var(--muted); font-size: 11px; line-height: 1.4; height: 31px; overflow: hidden; }
.price-row { display: flex; align-items: end; justify-content: space-between; gap: 6px; margin-top: 10px; min-height: 33px; }
.price { color: var(--red-dark); font-weight: 850; font-size: 15px; }
.old-price { display: block; color: #8B8278; text-decoration: line-through; font-size: 10px; margin-bottom: 1px; }
.product-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 9px; }
.product-actions button { min-height: 36px; border-radius: 11px; padding: 7px 5px; font-size: 10px; line-height: 1.15; font-weight: 850; }
.product-cart-button { border: 1px solid var(--red); color: var(--red); background: white; }
.product-buy-button { border: 1px solid var(--red); color: white; background: var(--red); box-shadow: 0 7px 17px rgba(15,77,58,.14); }
.product-actions button:disabled { border-color: #D8D0C6; background: #E7E1D8; color: #8B837A; box-shadow: none; cursor: not-allowed; }
.sold-out { position: absolute; top: 10px; left: 10px; color: white; background: rgba(51,51,51,.84); padding: 6px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.image-wrap { position: relative; }
.empty-state { grid-column: 1 / -1; text-align: center; border: 1px dashed #D8C9B6; border-radius: 18px; padding: 32px 20px; background: #FFFDF8; }
.empty-state strong { display: block; margin: 8px 0 5px; }
.empty-state p { color: var(--muted); margin: 0; font-size: 13px; line-height: 1.5; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(51,51,51,.48); display: flex; align-items: end; justify-content: center; }
.sheet { width: min(620px, 100%); background: white; max-height: 88vh; overflow-y: auto; border-radius: 28px 28px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 60px rgba(51,51,51,.18); }
.sheet-handle { width: 46px; height: 5px; border-radius: 9px; background: #D8CBB9; margin: -8px auto 16px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; font: 700 27px Georgia, serif; }
.text-button { border: 0; background: transparent; color: var(--red); font-weight: 750; padding: 8px; }
.cart-line { display: grid; grid-template-columns: 58px 1fr auto; gap: 11px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line img, .cart-thumb { width: 58px; height: 58px; border-radius: 14px; object-fit: cover; background: var(--red-soft); display: grid; place-items: center; color: var(--red); font-weight: 800; }
.cart-line h4 { margin: 0 0 5px; font-size: 14px; }
.cart-line p { margin: 0; color: var(--muted); font-size: 12px; }
.quantity { display: flex; align-items: center; gap: 8px; }
.quantity button { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--red); font-weight: 800; }
.total-row { display: flex; justify-content: space-between; margin: 18px 0; font-size: 18px; font-weight: 850; }
.field { display: grid; gap: 7px; margin-bottom: 13px; }
.field label { font-size: 12px; font-weight: 750; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 13px; padding: 12px 13px; background: white; color: var(--ink); outline: none; }
.field textarea { min-height: 82px; resize: vertical; }
.primary-button { width: 100%; border: 0; color: white; background: var(--red); padding: 14px 18px; border-radius: 14px; font-weight: 800; box-shadow: 0 10px 24px rgba(15,77,58,.18); }
.primary-button:disabled { opacity: .55; cursor: wait; }
.secondary-button { border: 1px solid var(--line); color: var(--red); background: white; padding: 11px 15px; border-radius: 12px; font-weight: 750; }
.notice { padding: 12px 14px; border-radius: 13px; color: var(--red-dark); background: var(--red-soft); font-size: 13px; line-height: 1.45; margin: 12px 0; }
.success { color: var(--green); background: #edf8f2; }
.hidden { display: none !important; }

@keyframes hero-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes brand-pulse-in { 0%, 100% { opacity: .72; transform: scale(.92) translateY(2px); } 42%, 58% { opacity: 1; transform: scale(1.1) translateY(-3px); } }
@keyframes brand-pulse-out { 0%, 16%, 84%, 100% { opacity: 1; transform: scale(1.1) translateY(-3px); } 50% { opacity: .7; transform: scale(.92) translateY(2px); } }
@keyframes card-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (hover: hover) {
  .product-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(51,51,51,.09); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .floating-kitchen-item img { animation: none !important; opacity: .88; }
}

/* Admin */
.admin-body { background: #F8F4EA; }
#adminApp { min-height: 100vh; }
.login-card { width: min(420px, calc(100% - 32px)); margin: 10vh auto; background: white; border: 1px solid var(--line); border-radius: 26px; padding: 28px; box-shadow: var(--shadow); }
.login-card .brand-logo { margin: 0 auto; }
.login-card h1 { margin: 18px 0 6px; font: 700 31px Georgia, serif; text-align: center; }
.login-card p { color: var(--muted); font-size: 13px; line-height: 1.5; margin-bottom: 22px; }
.admin-layout { max-width: 1380px; margin: 0 auto; padding: 24px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.admin-title { display: flex; gap: 12px; align-items: center; }
.admin-title h1 { margin: 0; font: 700 29px Georgia, serif; }
.admin-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 17px; }
.stat strong { display: block; font-size: 26px; color: var(--red); }
.stat span { color: var(--muted); font-size: 12px; }
.admin-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; }
.admin-tab { border: 1px solid var(--line); background: white; color: var(--muted); border-radius: 12px; padding: 11px 16px; white-space: nowrap; font-weight: 750; }
.admin-tab.active { background: var(--red); color: white; border-color: var(--red); }
.panel { background: white; border: 1px solid var(--line); border-radius: 22px; padding: 20px; box-shadow: 0 10px 30px rgba(51,51,51,.04); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel-head h2 { margin: 0; font: 700 24px Georgia, serif; }
.panel-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.field small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.image-status { display: block; min-height: 16px; margin-top: 5px; color: var(--green) !important; font-weight: 700; }
.image-status.image-error { color: var(--red) !important; }
.admin-grid { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(420px, 1.4fr); gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.full { grid-column: 1 / -1; }
.checkbox { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.list { display: grid; gap: 9px; }
.list-item { border: 1px solid var(--line); border-radius: 15px; padding: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.list-item-main { min-width: 0; }
.list-item h3 { margin: 0 0 4px; font-size: 14px; }
.list-item p { margin: 0; color: var(--muted); font-size: 11px; }
.badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: var(--red-soft); color: var(--red); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.badge.green { color: var(--green); background: #eaf7f0; }
.row-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.row-actions button { border: 1px solid var(--line); background: white; border-radius: 9px; padding: 7px 9px; color: var(--red); font-size: 11px; font-weight: 750; }
.row-actions .danger-button { color: #A14421; border-color: #E9C5AF; background: #FFF9F4; }
.integration-test { width: 100%; margin-top: 10px; }
.phone-gate { min-height: 100vh; max-width: 430px; margin: 0 auto; padding: max(64px, calc(40px + env(safe-area-inset-top))) 24px 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: radial-gradient(circle at 50% 25%, #F3E9DA, #fff 52%); }
.phone-gate .brand-logo { margin-bottom: 18px; }
.phone-gate .gate-kicker { color: var(--red); font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.phone-gate h1 { margin: 10px 0 12px; color: var(--red-dark); font: 700 34px/1.05 Georgia, serif; }
.phone-gate p { max-width: 340px; margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.phone-gate .primary-button, .phone-gate .secondary-button { max-width: 340px; }
.phone-gate .secondary-button { margin-top: 10px; }
.phone-gate small { max-width: 320px; margin-top: 18px; color: var(--muted); line-height: 1.45; }
.admin-product { display: grid; grid-template-columns: 64px 1fr auto; }
.admin-product img, .admin-product .cart-thumb { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.order-card { border: 1px solid var(--line); border-radius: 18px; padding: 15px; }
.order-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.order-top h3 { margin: 0 0 4px; }
.order-meta { color: var(--muted); font-size: 12px; line-height: 1.5; }
.order-items { margin: 12px 0; padding: 10px; border-radius: 12px; background: #FCF8F1; font-size: 12px; line-height: 1.7; }
.order-status { min-width: 130px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.future-card { border: 1px dashed #D9C7AE; padding: 22px; border-radius: 18px; color: var(--muted); }
.future-card strong { color: var(--ink); display: block; margin-bottom: 6px; }
.watermark-preview { grid-column: 1 / -1; width: min(100%, 320px); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #FFFDF8; }
.watermark-preview img { display: block; width: 100%; max-height: 220px; object-fit: contain; }
.watermark-preview span { display: block; padding: 8px 11px; color: var(--muted); font-size: 11px; }
.inventory-list { display: grid; gap: 10px; }
.inventory-row { display: grid; grid-template-columns: 58px minmax(150px, 1.4fr) 110px 100px 88px auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 16px; padding: 11px; }
.inventory-row > img, .inventory-row > .cart-thumb { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; }
.inventory-product { display: grid; gap: 4px; min-width: 0; }
.inventory-product strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inventory-product span, .inventory-stock span { color: var(--muted); font-size: 11px; }
.inventory-stock { display: grid; gap: 4px; }
.inventory-stock input { width: 100%; min-width: 74px; border: 1px solid var(--line); border-radius: 10px; padding: 9px; }
.inventory-switch { display: grid; grid-template-columns: auto 1fr; gap: 7px; align-items: center; color: var(--muted); font-size: 12px; }
.traffic-grid { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(520px, 1.45fr); gap: 16px; align-items: start; }
.traffic-recent { grid-column: 1 / -1; }
.traffic-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
.traffic-stat-grid > div { border: 1px solid #E8DBC9; border-radius: 14px; padding: 14px; background: #FFFDF8; }
.traffic-stat-grid strong { display: block; color: var(--red); font-size: 24px; }
.traffic-stat-grid span { color: var(--muted); font-size: 11px; }
.traffic-bars { display: grid; gap: 8px; }
.traffic-bar-row { display: grid; grid-template-columns: 38px 1fr 28px; gap: 8px; align-items: center; font-size: 11px; color: var(--muted); }
.traffic-bar-row > div { height: 8px; overflow: hidden; border-radius: 999px; background: #EFE5D7; }
.traffic-bar-row i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--red), #D26932); }
.traffic-bar-row strong { text-align: right; color: var(--ink); }
.table-scroll { overflow-x: auto; }
.traffic-devices table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 12px; }
.traffic-devices th { padding: 8px 10px; color: var(--muted); text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
.traffic-devices td { padding: 11px 10px; border-bottom: 1px solid #EEE4D7; vertical-align: top; }
.traffic-devices code { color: var(--red-dark); font-size: 11px; }
.traffic-devices small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.activity-list { display: grid; gap: 1px; }
.activity-list > div { display: grid; grid-template-columns: 12px minmax(120px, 1fr) minmax(100px, .8fr) auto; gap: 8px; align-items: center; padding: 10px 5px; border-bottom: 1px solid #EEE5D9; font-size: 12px; }
.activity-list code, .activity-list time { color: var(--muted); font-size: 11px; }
.activity-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.admin-user { align-items: flex-start; }
@media (max-width: 760px) {
  .admin-layout { padding: 14px; }
  .admin-header { align-items: flex-start; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .full { grid-column: auto; }
  .admin-product { grid-template-columns: 52px 1fr; }
  .admin-product .row-actions { grid-column: 1 / -1; }
  .inventory-row { grid-template-columns: 50px 1fr 86px; }
  .inventory-row > img, .inventory-row > .cart-thumb { width: 50px; height: 50px; }
  .inventory-switch, .inventory-row > .badge, .inventory-row > button { grid-column: auto; }
  .traffic-grid { grid-template-columns: 1fr; }
  .traffic-recent { grid-column: auto; }
}
@media (max-width: 520px) {
  .inventory-row { grid-template-columns: 48px 1fr; }
  .inventory-stock, .inventory-switch, .inventory-row > .badge, .inventory-row > button { grid-column: 1 / -1; }
  .activity-list > div { grid-template-columns: 12px 1fr auto; }
  .activity-list time { grid-column: 2 / -1; }
  .traffic-stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .hero { min-height: 208px; padding: 16px; }
  .hero h1 { font-size: clamp(30px, 9vw, 39px); }
  .hero-copy-centered { width: min(84%, 330px); padding: 20px 10px; }
  .item-frying-pan { width: 121px; height: 41px; left: 1px; top: 8px; }
  .item-stock-pot { width: 70px; height: 54px; right: 7px; top: 0; }
  .item-kettle { width: 103px; height: 41px; left: 0; top: 59px; }
  .item-chef-knife { width: 101px; height: 40px; left: 1px; bottom: 49px; }
  .item-whisk { width: 84px; height: 44px; right: 0; top: 57px; }
  .item-spatula { width: 96px; height: 36px; left: 5px; bottom: 5px; }
  .item-cutting-board { width: 103px; height: 40px; right: -3px; bottom: 48px; }
  .item-mixing-bowl { width: 109px; height: 45px; right: 1px; bottom: 2px; }
  .content { padding-left: 15px; padding-right: 15px; }
}
@media (max-width: 380px) {
  .topbar { padding-left: 13px; padding-right: 13px; }
  .brand-logo-compact { width: 44px; height: 44px; }
  .brand-copy strong { font-size: 14px; }
  .brand-copy span { font-size: 10px; }
  .hero { min-height: 198px; }
  .item-frying-pan { left: 0; }
  .item-stock-pot { right: 7px; }
  .item-kettle { left: 0; }
  .item-whisk { right: 0; }
  .item-spatula { left: 7px; }
  .item-mixing-bowl { right: 2px; }
}
@media (min-width: 520px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Storefront collections, delivery and product detail */
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button.active { background: var(--red); border-color: var(--red); color: white; }
.store-section { margin-top: 24px; }
.store-section:first-of-type { margin-top: 18px; }
.product-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(158px, 45%); gap: 12px; overflow-x: auto; padding: 2px 2px 12px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.product-strip .product-card { scroll-snap-align: start; }
.favorite-button { position: absolute; top: 9px; right: 9px; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(15,77,58,.15); border-radius: 50%; background: rgba(255,255,255,.92); color: var(--red); font-size: 20px; box-shadow: 0 5px 16px rgba(51,51,51,.12); }
.favorite-button.active { color: white; background: var(--red); }
.photo-count { position: absolute; right: 8px; bottom: 8px; padding: 5px 7px; border-radius: 999px; color: white; background: rgba(51,51,51,.72); font-size: 9px; font-weight: 750; }
.checkout-fields { display: grid; gap: 2px; }
.location-button { width: 100%; border: 1px dashed #DDB99F; border-radius: 13px; padding: 12px; color: var(--red); background: #FFF9F3; font-weight: 800; text-align: center; }
.location-button.selected { border-style: solid; color: var(--green); background: #edf8f2; }
.delivery-help { display: block; margin: -3px 0 13px; color: var(--muted); font-size: 10px; }
.sticky-cart { position: fixed; z-index: 25; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(620px, calc(100% - 28px)); display: flex; justify-content: space-between; align-items: center; border: 0; border-radius: 16px; padding: 14px 17px; color: white; background: var(--red); box-shadow: 0 14px 36px rgba(15,77,58,.3); font-weight: 800; }
.shop-toast { position: fixed; z-index: 80; left: 50%; bottom: calc(82px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); border-radius: 999px; padding: 11px 16px; color: white; background: #333333; box-shadow: 0 12px 30px rgba(0,0,0,.24); font-size: 12px; font-weight: 800; animation: toast-in .2s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
.reorder-list { display: grid; gap: 9px; }
.reorder-list article { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 15px; padding: 12px; background: white; }
.reorder-list article div { min-width: 0; display: grid; gap: 3px; }
.reorder-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.reorder-list small { color: var(--red); font-size: 10px; text-transform: capitalize; }
.reorder-list button { flex: 0 0 auto; border: 1px solid var(--red); border-radius: 10px; padding: 9px; color: var(--red); background: white; font-size: 10px; font-weight: 800; }
.modal-backdrop { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; padding: 18px; background: rgba(51,51,51,.58); }
.product-modal { position: relative; width: min(500px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; border-radius: 24px; background: white; box-shadow: 0 24px 70px rgba(51,51,51,.28); }
.modal-close { position: absolute; z-index: 3; top: 10px; right: 10px; width: 38px; height: 38px; border: 0; border-radius: 50%; color: var(--red); background: rgba(255,255,255,.94); font-size: 25px; box-shadow: 0 5px 18px rgba(0,0,0,.12); }
.quick-image { position: relative; overflow: auto; background: #FCF5EA; cursor: zoom-in; }
.product-detail-image { display: block; width: 100%; max-height: 52vh; aspect-ratio: 1 / 1; object-fit: contain; transition: transform .2s ease; transform-origin: center; }
.quick-image.zoomed .product-detail-image { transform: scale(1.7); cursor: zoom-out; }
.thumbnail-row { display: flex; gap: 7px; overflow-x: auto; padding: 10px 14px 0; }
.thumbnail-row button { width: 52px; height: 52px; flex: 0 0 auto; overflow: hidden; border: 2px solid transparent; border-radius: 10px; padding: 0; background: white; }
.thumbnail-row button.active { border-color: var(--red); }
.thumbnail-row img { width: 100%; height: 100%; object-fit: cover; }
.quick-body { padding: 18px; }
.quick-body > span { color: var(--red); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .1em; }
.quick-body h2 { margin: 6px 0; font: 700 28px Georgia, serif; }
.quick-body p { margin: 0 0 14px; color: var(--muted); line-height: 1.5; }
.quick-body > small { display: block; margin: 8px 0 12px; color: var(--muted); }
.quick-price { display: flex; align-items: baseline; gap: 9px; color: var(--red); }
.quick-price strong { font-size: 20px; }
.quick-price del { color: #8B8278; }
.contact-link { width: auto; text-decoration: none; }

/* Admin order and inventory workflow */
.preview-grid { width: 100%; max-width: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 8px; }
.preview-grid figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.preview-grid img { width: 100%; height: 120px; object-fit: cover; }
.preview-grid figcaption { padding: 6px; color: var(--muted); font-size: 10px; }
.inventory-layout, .orders-layout { display: grid; gap: 16px; }
.low-stock-alert { display: grid; gap: 4px; margin-bottom: 14px; padding: 12px 14px; border-radius: 14px; color: #8a5200; background: #fff3d8; }
.low-stock-alert span { font-size: 11px; line-height: 1.5; }
.inventory-history { display: grid; }
.inventory-history article { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.inventory-history article div { display: grid; gap: 3px; }
.inventory-history span, .inventory-history time { color: var(--muted); font-size: 10px; }
.inventory-history b.positive { color: var(--green); }
.inventory-history b.negative { color: var(--red); }
.order-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.order-summary div { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.order-summary strong, .order-summary span { display: block; }
.order-summary strong { color: var(--red); font-size: 21px; }
.order-summary span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.order-tools { display: grid; grid-template-columns: 1fr 180px; gap: 10px; margin-bottom: 15px; }
.order-tools input, .order-tools select { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: white; }
.order-contact { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.order-contact a, .delivery-card a { color: var(--red); font-size: 11px; font-weight: 800; text-decoration: none; }
.order-contact a { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; }
.delivery-card { display: grid; gap: 4px; padding: 10px; border-radius: 12px; background: #FFF9F3; font-size: 11px; }
.delivery-card span { color: var(--muted); }
.order-handler { margin-top: 4px; color: var(--green); font-size: 10px; font-weight: 800; }
.badge.danger { color: #A14421; background: #F7DED0; }
.status-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.status-buttons button { border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; color: var(--muted); background: white; font-size: 10px; font-weight: 800; }
.status-buttons button.active { border-color: var(--red); color: white; background: var(--red); }
.status-history { margin-top: 12px; font-size: 11px; }
.status-history summary { color: var(--red); cursor: pointer; font-weight: 800; }
.status-history div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); text-transform: capitalize; }
.status-history span { color: var(--muted); }

@media (max-width: 520px) {
  .product-strip { grid-auto-columns: minmax(154px, 66%); }
  .order-summary { grid-template-columns: 1fr; }
  .order-tools { grid-template-columns: 1fr; }
  .preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-history article { grid-template-columns: 1fr auto; }
  .inventory-history time { grid-column: 1 / -1; }
}
