:root {
  --red: #df3131;
  --red-dark: #b52626;
  --red-soft: #fdeeee;
  --green: #60bc46;
  --ink: #150c1a;
  --ink-2: #3f3a44;
  --muted: #6f6a75;
  --line: #e6e3e8;
  --bg: #f4f3f5;
  --card: #ffffff;
  --ok: #3f9a2a;
  --warn: #b7791f;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(20,12,26,.06);
  --shadow-lg: 0 20px 60px rgba(20,12,26,.24);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 24px; font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 12px; }
a { color: inherit; }
.muted { color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.fineprint { font-size: 12px; color: #a39ea8; margin-top: 28px; text-align: center; }
.link { color: var(--red); font-weight: 600; font-size: 14px; text-decoration: none; }
.link:hover { text-decoration: underline; }
.link-btn { font: inherit; background: none; border: 0; padding: 0; color: var(--red); font-weight: 600; cursor: pointer; text-decoration: underline; }
[hidden] { display: none !important; }

/* ---- Inputs & buttons ---- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=search], input[type=tel], input:not([type]), textarea, select {
  width: 100%; font: inherit; padding: 11px 13px; border: 1px solid #cfcad3; border-radius: 9px; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(223,49,49,.16); }
textarea { resize: vertical; }
.code-input { font-size: 28px; letter-spacing: 10px; text-align: center; font-weight: 700; }
.btn { font: inherit; font-weight: 600; border: 1px solid transparent; border-radius: 9px; padding: 11px 18px; cursor: pointer; background: #fff; color: var(--ink); transition: background .15s, transform .05s, box-shadow .15s; text-decoration: none; display: inline-block; text-align: center; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--red-dark); }
.btn-ghost { background: transparent; border-color: #cfcad3; }
.btn-ghost:hover { background: #fff; }
.btn-light { background: #fff; color: var(--red); }
.btn-light:hover { background: #fff3f3; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); }
.btn-link { background: none; color: var(--muted); padding: 8px; text-decoration: underline; font-weight: 500; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-lg { padding: 13px 22px; font-size: 16px; }
.icon-btn { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.icon-btn:hover { background: var(--bg); color: var(--ink); }
.stack > * + * { margin-top: 14px; }
.msg { margin-top: 14px; padding: 10px 12px; border-radius: 8px; font-size: 14px; background: #fdecec; color: #9b1c1c; }
.msg.ok { background: #e9f6e4; color: #2b6b1a; }
.msg.warn { background: #fff5dd; color: #7a5200; }

/* ---- Login ---- */
.login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(223,49,49,.16), transparent 60%), radial-gradient(800px 400px at 0% 100%, rgba(96,188,70,.12), transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 440px; background: var(--card); border-radius: 18px; padding: 36px 34px 26px; box-shadow: var(--shadow-lg); border-top: 5px solid var(--red); }
.login-logo { width: 200px; display: block; margin: 0 0 22px; }
.login-card h1 { margin-bottom: 6px; }
.login-card .muted { margin-bottom: 22px; }

/* ---- Demo strip ---- */
.demo-strip { background: #fff4c2; color: #5b4300; font-size: 13px; text-align: center; padding: 7px 14px; border-bottom: 1px solid #f0dd8c; }
.demo-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: #fff4c2; color: #7a5a00; border-radius: 4px; padding: 2px 6px; margin-left: 6px; vertical-align: middle; }

/* ---- Top bar ---- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--ink); color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 66px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; font-weight: 700; color: #fff; font-size: 14px; white-space: nowrap; }
.brand img { height: 34px; }
.brand span { opacity: .8; font-weight: 600; letter-spacing: .02em; }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tab { text-decoration: none; padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; color: rgba(255,255,255,.72); font-family: inherit; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.tab:hover { background: rgba(255,255,255,.08); color: #fff; }
.tab.active { color: #fff; background: var(--red); }
.tab-btn { color: var(--green); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.cart-btn { display: flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; font-size: 14px; background: #fff; color: var(--ink); border: 0; border-radius: 9px; padding: 9px 14px; cursor: pointer; white-space: nowrap; }
.cart-btn:hover { background: #f1eef3; }
.badge { background: var(--red); color: #fff; font-size: 12px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; display: inline-grid; place-items: center; padding: 0 6px; }
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-email { font-size: 13px; color: rgba(255,255,255,.7); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); white-space: nowrap; }
@media (max-width: 1240px) { .brand span { display: none; } .user-email { max-width: 140px; } .topbar-inner { gap: 16px; } }
.user-menu .btn-ghost:hover { background: rgba(255,255,255,.1); }

/* ---- Page ---- */
.page { max-width: 1280px; margin: 0 auto; padding: 32px 24px 60px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .muted { margin: 6px 0 0; max-width: 560px; }
.filters { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.filters .tf-toggle { align-self: flex-end; }
.filters input { width: 280px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid #d3ced7; background: #fff; color: var(--ink-2); cursor: pointer; }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.footer { max-width: 1280px; margin: 0 auto; padding: 18px 24px 40px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }

/* ---- Home ---- */
.hero { display: flex; align-items: center; gap: 24px; background: linear-gradient(120deg, var(--red) 0%, #c92a2a 100%); color: #fff; border-radius: 18px; padding: 36px 40px; margin-bottom: 30px; box-shadow: var(--shadow-lg); }
.hero-text { flex: 1; max-width: 640px; }
.hero-kicker { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; opacity: .85; font-weight: 700; margin-bottom: 10px; }
.hero h2 { font-size: 34px; margin-bottom: 10px; }
.hero p { font-size: 16px; opacity: .95; margin-bottom: 20px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-art { flex: 0 0 auto; opacity: .9; }
.section-title { font-size: 17px; font-weight: 800; margin: 0 0 12px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 34px; }
@media (max-width: 1180px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile { display: flex; flex-direction: column; gap: 12px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; text-decoration: none; border: 2px solid transparent; transition: border-color .15s, transform .15s; position: relative; min-height: 190px; }
.tile:hover { border-color: var(--red); transform: translateY(-2px); }
.tile-icon { width: 48px; height: 48px; color: var(--red); background: var(--red-soft); border-radius: 12px; display: grid; place-items: center; }
.tile-icon svg { width: 32px; height: 32px; }
.tile-title { font-weight: 800; font-size: 17px; }
.tile-blurb { font-size: 13px; color: var(--muted); margin-top: 4px; }
.tile-count { font-size: 12px; font-weight: 700; color: var(--red); margin-top: 8px; text-transform: uppercase; letter-spacing: .06em; }
.tile-imgs { display: flex; gap: 6px; margin-top: auto; }
.tile-imgs img { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.home-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--ink-2); }
.orders.compact .order { padding: 14px 16px; }
.orders.compact .btn-danger { display: none; }
.orders.compact .order-head { gap: 8px 14px; }

/* ---- Time frame toggle ---- */
.tf-toggle { display: inline-flex; border: 1px solid #cfcad3; border-radius: 9px; overflow: hidden; background: #fff; }
.tf { font: inherit; font-weight: 600; font-size: 13px; padding: 8px 14px; border: 0; background: #fff; color: var(--ink-2); cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.tf small { font-weight: 500; font-size: 11px; color: var(--muted); }
.tf.active { background: var(--ink); color: #fff; }
.tf.active small { color: #ccc; }
.tf[data-tf=rush].active { background: var(--red); }
.cart-tf, .tf-mini { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.cart-tf .tf-toggle { transform: scale(.92); transform-origin: right center; }
.tf-mini { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.price-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-hint { font-size: 12px; color: var(--muted); }
.price-hint.break { color: #7a5200; }

/* ---- Product grid ---- */
.card-img.no-img, .pm-img.no-img { cursor: default; background: linear-gradient(135deg, #ecebee, #dcdadf); }
.img-placeholder { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 4px; color: #8a858f; font-weight: 700; letter-spacing: .08em; }
.img-placeholder small { font-weight: 500; letter-spacing: 0; font-size: 12px; }
.img-mini { width: 72px; height: 48px; border-radius: 6px; background: #e6e3e8; }
.review-row .img-mini { width: 64px; height: 42px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; border: 1px solid transparent; transition: border-color .15s, box-shadow .15s; }
.card.in-cart { border-color: var(--green); }
.card-img { position: relative; aspect-ratio: 16 / 10; background: #fff; border-bottom: 1px solid var(--line); cursor: pointer; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.card:hover .card-img img { transform: scale(1.03); }
.card-img .sku { position: absolute; top: 10px; left: 10px; background: rgba(21,12,26,.85); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 4px 8px; border-radius: 6px; }
.card-img .sku.example { background: #fff4c2; color: #6b4d00; border: 1px dashed #d9b84a; }
.example-tag { display: inline-block; background: #fff4c2; color: #6b4d00; border: 1px dashed #d9b84a; border-radius: 4px; padding: 1px 6px; font-size: 11px; letter-spacing: .04em; }
.example-note { margin: 0; font-size: 13px; color: #6b4d00; background: #fff8dc; border-left: 3px solid #e2c15a; padding: 8px 10px; border-radius: 6px; }
.card-img .zoom, .pm-img .zoom { position: absolute; right: 10px; bottom: 10px; background: rgba(255,255,255,.92); border-radius: 6px; font-size: 11px; font-weight: 600; padding: 4px 8px; color: var(--ink-2); }
.card-body { padding: 12px 14px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.min-hint { font-size: 12px; color: var(--muted); }
.btn-danger { color: var(--red); border-color: #f0c2c5; }
.btn-danger:hover { background: var(--red-soft); }
.card-title { font-weight: 700; font-size: 15px; }
.card-title[data-open] { cursor: pointer; }
.card-title[data-open]:hover { color: var(--red); }
.card-place { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.card-meta { font-size: 12px; color: var(--muted); }
.card-desc { font-size: 12.5px; color: var(--muted); flex: 1; }
.card-price { font-weight: 700; font-size: 15px; }
.card-price small { font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 4px; }
.card-price.poa { color: var(--ink-2); font-weight: 600; font-size: 13px; }
.card-foot { display: flex; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.card-foot select { flex: 1; padding: 9px 10px; font-size: 14px; }
.card-foot input[data-text] { padding: 9px 10px; font-size: 14px; font-weight: 600; }
.qty { display: inline-flex; align-items: stretch; border: 1px solid #cfcad3; border-radius: 9px; overflow: hidden; background: #fff; }
.qty-sel { border: 0; background: none; overflow: visible; gap: 6px; align-items: center; flex: 1 1 100%; }
.qty-sel select { flex: 1; width: auto; min-width: 74px; max-width: 100%; padding: 9px 8px; font-size: 14px; font-weight: 700; }
.qty-sel input[data-qty-custom] { width: 62px; border: 1px solid #cfcad3; border-radius: 9px; text-align: center; padding: 8px 4px; font-weight: 700; }
.qty button { font: inherit; font-size: 18px; width: 30px; border: 0; background: #fff; cursor: pointer; color: var(--ink-2); }
.qty button:hover { background: var(--bg); }
.qty input { width: 46px; text-align: center; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; padding: 8px 4px; font-weight: 700; }
.qty input:focus { box-shadow: none; }
.btn-add { margin-left: auto; flex: 1 1 auto; white-space: nowrap; padding: 10px 12px; font-size: 14px; }
.btn-add.added { background: var(--green); }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 60px 0; }

/* ---- Product modal ---- */
.modal-card.wide { max-width: 980px; position: relative; padding: 0; background: #fff; }
.product-modal { overflow: auto; max-height: calc(100vh - 40px); border-radius: 16px; background: #fff; }
.modal-x { position: absolute; top: 10px; right: 12px; z-index: 2; background: #fff; }
.product-modal-inner { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 420px; }
.pm-img { position: relative; background: #fff; border-right: 1px solid var(--line); border-radius: 16px 0 0 16px; overflow: hidden; cursor: zoom-in; min-height: 320px; }
.pm-img { background: #ecebee; }
.pm-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-img img.portrait { object-fit: contain; }
.pm-body { padding: 26px 28px 24px; display: flex; flex-direction: column; gap: 12px; overflow: auto; }
.pm-sku { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pm-body h3 { font-size: 22px; }
.pm-desc { color: var(--ink-2); font-size: 14px; margin: 0; }
.facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 13px; }
.facts div { background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.facts dt { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.facts dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); }
.pm-price .card-price { font-size: 20px; }
.opt-notes { margin-top: 8px; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.pm-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.pm-actions .btn-lg { flex: 1; }
@media (max-width: 760px) {
  .product-modal-inner { grid-template-columns: 1fr; min-height: 0; }
  .pm-body { overflow: visible; padding: 20px 18px 22px; }
  .pm-img { border-right: 0; border-bottom: 1px solid var(--line); border-radius: 16px 16px 0 0; min-height: 220px; max-height: 300px; }
  .facts { grid-template-columns: 1fr; }
}

/* ---- Drawer ---- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(21,12,26,.45); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: #fff; z-index: 41; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow: auto; padding: 8px 20px; }
.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.cart-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; }
.cart-total .muted { font-weight: 500; font-size: 13px; }
.cart-line { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 72px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.cart-line .name { font-weight: 600; font-size: 14px; }
.cart-line .sub { font-size: 12px; color: var(--muted); }
.cart-line .qty input { width: 44px; }
.cart-line .remove { background: none; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; padding: 4px 0; }
.cart-empty { text-align: center; color: var(--muted); padding: 50px 10px; }

/* ---- Modals ---- */
.modal { position: fixed; inset: 0; background: rgba(21,12,26,.55); z-index: 50; display: grid; place-items: center; padding: 20px; overflow: auto; }
.modal-card { background: #fff; border-radius: 16px; width: 100%; max-width: 680px; box-shadow: var(--shadow-lg); max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.modal-card.small { max-width: 460px; padding: 36px 32px; text-align: center; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 18px 22px 22px; overflow: auto; }
.review-items { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 18px; }
.review-row { display: grid; grid-template-columns: 64px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.review-row:last-child { border-bottom: 0; }
.review-row img { width: 64px; height: 42px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); }
.review-row .q { font-weight: 700; }
.review-row .p { color: var(--muted); min-width: 70px; text-align: right; }
.review-total { display: flex; justify-content: flex-end; gap: 12px; padding: 10px 12px; background: var(--bg); font-weight: 700; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field.span-2 { grid-column: span 2; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.modal-actions.center { justify-content: center; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; background: #e9f6e4; color: var(--ok); font-size: 32px; font-weight: 800; display: grid; place-items: center; margin: 0 auto 16px; }

/* ---- Delivery options ---- */
.delivery-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.delivery-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #cfcad3; border-radius: 9px; padding: 10px 12px; cursor: pointer; font-weight: 500; margin: 0; }
.delivery-opt:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.delivery-opt input { margin-top: 3px; accent-color: var(--red); }
.delivery-opt span { display: flex; flex-direction: column; line-height: 1.3; }
.delivery-opt small { color: var(--muted); font-weight: 500; }
.delivery-note { margin-top: 8px; }
.addr-book { margin-top: 12px; }
.addr-book-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.addr-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #cfcad3; border-radius: 9px; padding: 10px 12px; cursor: pointer; margin: 0; font-weight: 500; font-size: 13px; line-height: 1.35; }
.addr-card:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.addr-card input { margin-top: 2px; accent-color: var(--red); }
.addr-card b { display: block; font-size: 14px; }
.addr-card.new { align-items: center; color: var(--ink-2); }
@media (max-width: 600px) { .addr-book-list { grid-template-columns: 1fr; } }
.addr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.addr-grid .field label { margin-bottom: 4px; }
@media (max-width: 600px) { .addr-grid { grid-template-columns: 1fr; } .addr-grid .span-2 { grid-column: span 1; } }
.review-line { display: flex; justify-content: space-between; padding: 8px 12px; font-size: 14px; border-top: 1px solid var(--line); }
@media (max-width: 600px) { .delivery-opts { grid-template-columns: 1fr; } }

/* ---- Orders ---- */
.orders { display: flex; flex-direction: column; gap: 14px; }
.order { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.order-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 12px; }
.order-num { font-weight: 800; font-size: 17px; }
.order-meta { color: var(--muted); font-size: 13px; }
.status { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #eef0ff; color: #3a43b8; text-transform: capitalize; }
.status.complete { background: #e9f6e4; color: var(--ok); }
.status.cancelled { background: #f1f1f3; color: var(--muted); }
.status.in_shopvox { background: #fff5dd; color: #7a5200; }
.order-head .btn { margin-left: auto; }
.order-head .btn + .btn { margin-left: 0; }
.order-items { display: flex; flex-wrap: wrap; gap: 10px; }
.order-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px 6px 6px; font-size: 13px; }
.order-item img { width: 56px; height: 36px; object-fit: cover; border-radius: 4px; }
.order-item b { font-size: 14px; }
.order-notes { margin-top: 12px; font-size: 13px; color: var(--ink-2); background: #fff8e1; border-left: 3px solid #f5b400; padding: 8px 12px; border-radius: 6px; white-space: pre-wrap; }

/* ---- Lightbox & toast ---- */
.lightbox { position: fixed; inset: 0; background: rgba(10,6,14,.9); z-index: 60; display: grid; place-items: center; padding: 30px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; background: #fff; }
.lightbox-close { position: absolute; top: 14px; right: 18px; color: #fff; font-size: 36px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; z-index: 70; box-shadow: var(--shadow-lg); }

/* ---- "Need something new?" tile ---- */
.card-feedback { display: flex; align-items: stretch; cursor: pointer; border: 2px dashed #cfcad3; background: #fbfafc; box-shadow: none; }
.card-feedback:hover { border-color: var(--red); background: #fff; }
.card-feedback .fb-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 22px 18px; }
.card-feedback .fb-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 26px; font-weight: 800; display: grid; place-items: center; }
.card-feedback .card-desc { flex: 1; }
.card-feedback .btn { pointer-events: none; }
input[type=file] { font-size: 13px; }
input[type=file]::file-selector-button { font: inherit; font-size: 13px; font-weight: 600; padding: 7px 12px; border: 1px solid #cfcad3; border-radius: 8px; background: #fff; cursor: pointer; margin-right: 10px; }
input[type=file]::file-selector-button:hover { border-color: var(--red); color: var(--red); }

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .home-row { grid-template-columns: 1fr; }
  .hero-art { display: none; }
}
@media (max-width: 640px) { .tiles { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .topbar-inner { gap: 10px; padding: 0 12px; height: auto; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .brand img { height: 28px; }
  .brand span { display: none; }
  .user-email { display: none; }
  .user-menu .btn { padding: 7px 10px; }
  .cart-btn { margin-left: auto; padding: 8px 12px; }
  .cart-btn span:not(.badge) { display: none; }
  .tabs { order: 10; width: 100%; margin-left: 0; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 1 0 auto; text-align: center; padding: 8px 10px; white-space: nowrap; font-size: 13px; }
  .page { padding: 20px 14px 60px; }
  .hero { padding: 26px 22px; }
  .hero h2 { font-size: 26px; }
  .filters { align-items: stretch; width: 100%; }
  .filters input { width: 100%; }
  .chips { justify-content: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .field.span-2 { grid-column: span 1; }
  .review-row { grid-template-columns: 56px 1fr auto; }
  .review-row .p { display: none; }
  .footer { flex-direction: column; }
}

/* ---- Business-card builder ---- */
.card-proof { display: block; width: 100%; height: auto; border-radius: 3.5% / 5.7%; box-shadow: 0 6px 22px rgba(20,12,26,.28); }
.proof-bg { background: #e9e7ea; display: grid; place-items: center; padding: 14px 18px; }
.proof-bg .card-proof { box-shadow: 0 6px 18px rgba(20,12,26,.35); }
.proof-mini { width: 72px; height: 48px; display: grid; place-items: center; }
.proof-mini .card-proof { border-radius: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.review-row .proof-mini { width: 64px; height: 42px; }
.order-item .proof-mini { width: 56px; height: 36px; }
.pm-proof { background: #e9e7ea; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--line); border-radius: 16px 0 0 16px; }
.proof-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; color: var(--ink-2); gap: 10px; }
.proof-front { max-width: 460px; width: 100%; margin: 0 auto; }
.proof-back { max-width: 300px; width: 100%; margin: 10px auto 0; position: relative; opacity: .95; }
.proof-back .card-proof { box-shadow: 0 3px 12px rgba(20,12,26,.22); }
.proof-label { position: absolute; top: 8px; left: 10px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #9a949f; }
.pm-proof .hint { margin: 0; }
.builder-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.builder-fields input { font-weight: 600; }
.card-builder .card-foot .btn-add { flex: 1; }
@media (max-width: 760px) {
  .pm-proof { border-right: 0; border-bottom: 1px solid var(--line); border-radius: 16px 16px 0 0; }
  .builder-fields { grid-template-columns: 1fr; }
}
.facts-compact { margin-top: 14px; font-size: 12px; }
.facts-compact dd { font-weight: 500; }
