/* Tezgâh design system: a warm market stall, plum ink with saffron and mint. */
:root {
  --bg: #fff8ef; --surface: #ffffff; --surface-2: #fdf0e0; --ink: #251743; --muted: #6d6286;
  --line: #efe0cd; --primary: #e8630a; --primary-ink: #ffffff; --accent: #0c8577; --berry: #d6365f;
  --ok-bg: #dcf6ee; --ok: #0a6b5c; --bad-bg: #fde3e9; --bad: #a81f45; --warn-bg: #fff0c9; --warn: #8a5a00;
  --wait-bg: #ece8f6; --wait: #4b3d77; --plum: #2a1b4a;
  --radius: 18px; --shadow: 0 2px 4px rgba(42,27,74,.05), 0 12px 32px -12px rgba(42,27,74,.18);
  --shadow-up: 0 28px 48px -18px rgba(42,27,74,.34);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #140d24; --surface: #1f1636; --surface-2: #281d45; --ink: #f4eefe; --muted: #aea2c9;
  --line: #35295a; --primary: #ff8a33; --primary-ink: #1a0f00; --accent: #4fd8bf; --berry: #ff7596;
  --ok-bg: #103d35; --ok: #7ef0d6; --bad-bg: #44172a; --bad: #ff9db5; --warn-bg: #44340c; --warn: #ffd36b;
  --wait-bg: #2f2552; --wait: #c9bdf0; --plum: #0e0819;
  --shadow: 0 12px 32px -14px rgba(0,0,0,.6); --shadow-up: 0 28px 48px -18px rgba(0,0,0,.75);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
h1, h2, h3 { font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; line-height: 1.2; letter-spacing: -.015em; margin: .4em 0 .5em; }
h1 { font-size: clamp(1.55rem, 3.2vw, 2.2rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
a { color: inherit; text-decoration: none; }
p a, .prose a, .small a, label a { text-decoration: underline; text-underline-offset: 3px; }
a.btn, a.badge { text-decoration: none; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--surface); padding: 8px 14px; border-radius: 10px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Header */
.announce { background: var(--plum); color: #fff; text-align: center; padding: 6px 16px; font-size: .88rem; }
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.awning { height: 10px; background: repeating-linear-gradient(90deg, var(--primary) 0 34px, #ffd9ad 34px 68px); -webkit-mask: radial-gradient(11px at 17px 0, #000 98%, #0000) 0 0 / 34px 100%; mask: radial-gradient(17px 10px at 17px 0, #000 98%, #0000) 0 0 / 34px 100%; }
.top-row { display: flex; align-items: center; gap: 20px; padding: 8px 0; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.35rem; letter-spacing: -.03em; }
.logo img { transition: transform .5s cubic-bezier(.3,1.8,.5,1); }
.logo:hover img { transform: rotateY(360deg); }
.logo img.brand { height: 42px; width: auto; max-width: 220px; object-fit: contain; }
.logo:hover img.brand { transform: scale(1.05); }
/* Dark backgrounds get a light plate, so a dark logo stays readable. */
[data-theme="dark"] .logo img.brand, .foot .logo img.brand { background: #fff; border-radius: 10px; padding: 4px 8px; }
.search { flex: 1; position: relative; display: flex; }
.search input { flex: 1; border-radius: 999px; padding: 11px 52px 11px 20px; }
.search button { position: absolute; right: 5px; top: 5px; bottom: 5px; border: 0; border-radius: 999px; width: 40px; background: var(--primary); cursor: pointer; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-up); overflow: hidden; }
.suggest a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 18px; }
.suggest a:hover, .suggest a:focus { background: var(--surface-2); }
.actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 1.05rem; list-style: none; transition: transform .2s; }
.icon-btn:hover { transform: translateY(-2px); }
.icon-btn b { position: absolute; top: -6px; right: -6px; min-width: 20px; padding: 0 5px; border-radius: 99px; background: var(--berry); color: #fff; font-size: .72rem; line-height: 20px; text-align: center; }
.bump { animation: bump .5s; }
@keyframes bump { 35% { transform: scale(1.28) rotate(-8deg); } 70% { transform: scale(.94) rotate(4deg); } }
.menu { position: relative; }
.menu summary::-webkit-details-marker { display: none; }
.menu > div { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-up); padding: 8px; display: grid; z-index: 40; }
.menu > div a, .menu > div button { padding: 8px 12px; border-radius: 10px; text-align: left; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; width: 100%; }
.menu > div a:hover, .menu > div button:hover { background: var(--surface-2); }
.menu-money { margin: 0 0 4px; padding: 8px 12px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.cats { display: flex; gap: 2px; overflow-x: auto; padding: 0 0 8px; scrollbar-width: none; }
.cats a { white-space: nowrap; padding: 5px 9px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.cats a:hover { background: var(--surface-2); }
.cats a.hot { color: var(--berry); }
.cats a.on { background: var(--plum); color: #fff; }
.cat { position: relative; display: flex; flex: none; }
.cat-drop, .caret { display: none; }
/* Subcategory menus need a mouse and room; touch screens open the category page, which lists them. */
@media (min-width: 901px) and (hover: hover) {
  .cats { flex-wrap: wrap; overflow: visible; }
  .cats a { padding-inline: 4px; font-size: .81rem; }
  .caret { display: inline; margin-left: 2px; font-size: .7rem; opacity: .65; }
  .cat-drop { position: absolute; top: 100%; left: 0; z-index: 45; min-width: 240px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-up); }
  .cat:nth-of-type(n+6) > .cat-drop { left: auto; right: 0; }
  .cat:hover > .cat-drop, .cat:focus-within > .cat-drop { display: grid; }
  .cat-drop strong { padding: 6px 10px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
  .cats .cat-drop a { border-radius: 10px; padding: 8px 10px; font-size: .9rem; }
  .cats .cat-drop a.all { color: var(--primary); }
}
main { min-height: 60vh; padding: 18px 0 60px; }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; transition: transform .15s, box-shadow .2s, filter .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); box-shadow: 0 5px 0 color-mix(in srgb, var(--primary) 60%, #000); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:active { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, var(--primary) 60%, #000); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn.sm { padding: 6px 13px; font-size: .86rem; border-radius: 11px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; max-width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 3px solid color-mix(in srgb, var(--accent) 25%, transparent); }
textarea { resize: vertical; width: 100%; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack > .btn:not(.block) { align-self: flex-start; }
label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .92rem; }
label input, label select, label textarea { font-weight: 400; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; }
label.check input { margin-top: 5px; }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.two > label { flex: 1; min-width: 0; }
.row.two input { width: 100%; }
.row.three { align-items: flex-end; }
.row.three > label { flex: 1 1 180px; }
.row > textarea { flex: 1 1 260px; width: auto; }
.errors ul { margin: 0; padding: 10px 14px 10px 30px; background: var(--bad-bg); color: var(--bad); border-radius: 12px; }
.validation-summary-valid { display: none; }

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; display: block; }
.card.stack { display: flex; }
.card.lift { transition: transform .25s, box-shadow .25s; }
.card.lift:hover { transform: translateY(-4px) rotate(-.25deg); box-shadow: var(--shadow-up); }
.grid { display: grid; gap: 16px; }
.cols-3 { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.cols-4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid > .card { margin: 0; }
.section { margin-top: 40px; }
.card.section { margin-top: 20px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head a { font-weight: 700; color: var(--primary); }
.alert { padding: 12px 16px; border-radius: 14px; font-weight: 600; }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.error { background: var(--bad-bg); color: var(--bad); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.wait { background: var(--wait-bg); color: var(--wait); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.chips a { padding: 5px 13px; border-radius: 999px; background: var(--surface-2); font-size: .86rem; font-weight: 600; }
.chips a:hover, .chips a.active { background: var(--plum); color: #fff; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: var(--muted); }
.crumbs a::after { content: "›"; margin-left: 6px; }
.empty { text-align: center; padding: 44px 20px; border: 2px dashed var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.plus { color: var(--ok); font-weight: 700; white-space: nowrap; }
.minus { color: var(--bad); font-weight: 700; white-space: nowrap; }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 24px 0; font-weight: 700; }
.pager a { padding: 8px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.stars { color: #f2a20d; letter-spacing: 1px; }
code { background: var(--surface-2); padding: 2px 7px; border-radius: 7px; overflow-wrap: anywhere; }
.secret { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; background: var(--surface-2); border: 1px dashed var(--primary); border-radius: 14px; padding: 12px 16px; margin: 8px 0; }
.secret p { margin: 0; }

/* Product cards */
.product-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 16px; }
.pcard { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0)); transition: transform .18s ease-out, box-shadow .25s; }
.pcard:hover { --ty: -5px; box-shadow: var(--shadow-up); }
.pcard::after, .gallery-main::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.28), transparent 65%); }
.pcard:hover::after, .gallery-main:hover::after { opacity: 1; }
.pcard-img { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.pcard:hover .pcard-img img { transform: scale(1.07); }
.ribbon { position: absolute; top: 12px; left: -2px; background: var(--berry); color: #fff; font-weight: 800; font-size: .8rem; padding: 4px 14px 4px 12px; clip-path: polygon(0 0, 100% 0, 86% 50%, 100% 100%, 0 100%); }
.star-tag { position: absolute; top: 12px; right: 12px; background: var(--plum); color: #ffd36b; font-size: .72rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; }
.pcard-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard-store { font-size: .76rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.pcard h3 { margin: 0; font-size: .96rem; min-height: 2.4em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-body p { margin: 0; }
.pcard-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.price { display: flex; flex-direction: column; margin: 0; }
.price s { color: var(--muted); font-size: .82rem; }
.price strong { font-size: 1.18rem; }
.price.big strong { font-size: 2.1rem; }
.price.big .badge { align-self: flex-start; }
.add { width: 40px; height: 40px; border-radius: 13px; border: 0; background: var(--plum); color: #fff; font-size: 1.25rem; cursor: pointer; transition: transform .25s cubic-bezier(.3,1.8,.5,1), background .2s; }
[data-theme="dark"] .add { background: var(--primary); color: var(--primary-ink); }
.add:hover { transform: rotate(90deg) scale(1.1); background: var(--primary); }
.flyer { position: fixed; z-index: 80; width: 70px; height: 70px; border-radius: 16px; object-fit: cover; pointer-events: none; box-shadow: var(--shadow-up); transition: transform .75s cubic-bezier(.5,-.25,.75,.6), opacity .75s; }

/* Home */
.hero { position: relative; overflow: hidden; margin-top: -18px; padding: 36px 0; background: radial-gradient(900px 420px at 85% 10%, rgba(232,99,10,.20), transparent 70%), radial-gradient(700px 400px at 5% 90%, rgba(12,133,119,.18), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 24px; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.7rem); font-weight: 800; background: linear-gradient(100deg, var(--ink) 40%, var(--primary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 800; color: var(--accent); margin: 0; }
.hero-stats { display: flex; gap: 28px; margin: 28px 0 0; }
.hero-stats dt { font-size: .76rem; color: var(--muted); }
.hero-stats dd { margin: 0; font-size: 1.7rem; font-weight: 800; }
.stage { position: relative; min-height: 440px; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.stage canvas.dragging { cursor: grabbing; }
.stage-hint { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); margin: 0; white-space: nowrap; font-size: .8rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 4px 14px; }
.stage-hint b { display: inline-block; min-width: 24px; padding: 0 7px; margin-left: 6px; border-radius: 99px; background: var(--primary); color: var(--primary-ink); text-align: center; }
.carousel { perspective: 1100px; height: 260px; overflow: hidden; cursor: grab; touch-action: pan-y; user-select: none; }
.ring { position: relative; width: 210px; height: 220px; margin: 20px auto 0; transform-style: preserve-3d; }
.face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 18px; text-align: center; border-radius: 24px; background: linear-gradient(160deg, var(--surface), var(--surface-2)); border: 1px solid var(--line); box-shadow: var(--shadow); backface-visibility: hidden; }
.face small { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.face-icon { font-size: 2.8rem; display: block; filter: drop-shadow(0 8px 6px rgba(0,0,0,.18)); }
.cat-card h2 { margin-bottom: 0; }
.cat-card:hover .face-icon { animation: bump .6s; }
.cat-card { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.steps article { padding: 22px; border-radius: var(--radius); background: var(--plum); color: #fff; }
.steps span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary); color: var(--primary-ink); font-weight: 800; transform: rotate(-8deg); }
.steps p { color: #cfc5ea; margin: 0; }
[data-reveal].pre-reveal { opacity: 0; transform: translateY(28px); }
[data-reveal] { transition: opacity .6s, transform .6s; }

/* Listing, product, cart */
.layout-side { display: grid; grid-template-columns: 250px 1fr; gap: 20px; align-items: start; }
.layout-side > section { min-width: 0; }
.filters summary { font-weight: 800; cursor: pointer; margin-bottom: 8px; }
.side-link { display: block; padding: 5px 0; }
.side-link.on { font-weight: 800; color: var(--primary); }
.side-sub { margin: 0 0 6px 10px; padding-left: 14px; border-left: 3px solid var(--line); font-size: .9rem; }

/* Subcategory buttons on a category page */
.subcats { margin: 4px 0 20px; }
.subcats h2 { font-size: 1rem; margin: 0 0 10px; }
.subcat-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.subcat { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; padding: 11px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); line-height: 1.3; transition: transform .15s, border-color .15s; }
.subcat::after { content: "›"; grid-column: 2; grid-row: 1 / span 2; font-size: 1.5rem; color: var(--primary); }
.subcat small { grid-column: 1; font-size: .78rem; font-weight: 600; color: var(--muted); }
.subcat:hover { transform: translateY(-2px); border-color: var(--primary); }
.subcat.active { background: var(--plum); border-color: var(--primary); color: #fff; }
.subcat.active small { color: #d9d0f0; }
.subcat.active::after { content: "✓"; font-size: 1.1rem; color: #ffb35c; }
.product-page { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.gallery-main { position: relative; aspect-ratio: 1; border-radius: 26px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-up); transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .18s ease-out; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; transition: transform .25s; transform-origin: var(--mx, 50%) var(--my, 50%); }
.gallery-main.zoomed img { transform: scale(2.1); }
.gallery-main { cursor: zoom-in; }
.gallery-main.zoomed { cursor: zoom-out; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.thumbs button { padding: 0; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: none; cursor: pointer; line-height: 0; }
.thumbs button:hover { border-color: var(--primary); }
.thumbs img { object-fit: cover; width: 72px; height: 72px; border-radius: 10px; }
.thumbs form { display: grid; gap: 6px; justify-items: center; }
.facts { list-style: none; padding: 0; display: grid; gap: 6px; }
.buy-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.buy-form input { width: 90px; }
.seller-box { margin-top: 16px; padding: 14px; border-radius: 14px; background: var(--surface-2); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.qa { border-bottom: 1px solid var(--line); padding: 6px 0; }
.qa p { margin: 4px 0; }
.reply { background: var(--surface-2); border-radius: 12px; padding: 8px 12px; }
.layout-cart { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.sticky { position: sticky; top: 150px; }
.line { display: flex; gap: 16px; align-items: flex-start; }
.line img { border-radius: 14px; object-fit: cover; aspect-ratio: 1; }
.line input[type="number"] { width: 80px; }
.grow { flex: 1; min-width: 0; }
.sum { display: flex; justify-content: space-between; gap: 16px; margin: 6px 0; }
.sum.total { border-top: 2px dashed var(--line); padding-top: 10px; font-size: 1.2rem; font-weight: 800; }
.pay-frame { width: 100%; height: 760px; border: 0; border-radius: var(--radius); background: #fff; }
.auth { max-width: 480px; margin-top: 20px; }

/* Stores */
.avatar { display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 18px; background: linear-gradient(140deg, var(--primary), var(--berry)); color: #fff; font-size: 1.5rem; font-weight: 800; object-fit: cover; }
.avatar.lg { width: 88px; height: 88px; font-size: 2.4rem; border-radius: 26px; }
.store-card { display: flex !important; gap: 14px; }
.store-card > span:last-child { display: flex; flex-direction: column; }
.shop-head { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 18px; }
.shop-head .awning { height: 34px; -webkit-mask: radial-gradient(17px 34px at 17px 0, #000 98%, #0000) 0 0 / 34px 100%; mask: radial-gradient(17px 34px at 17px 0, #000 98%, #0000) 0 0 / 34px 100%; }
.shop-info { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; padding: 18px 22px; }
.shop-info > div { flex: 1 1 280px; }

/* Panels */
.panel { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; }
.panel-nav { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.panel-nav h2 { padding: 0 10px; }
.panel-nav nav { display: grid; gap: 2px; }
.panel-nav a { padding: 8px 12px; border-radius: 11px; font-weight: 600; font-size: .93rem; transition: background .2s, transform .2s; }
.panel-nav a:hover { background: var(--surface-2); transform: translateX(3px); }
.panel-nav a.active { background: var(--plum); color: #fff; }
.panel-nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.count { min-width: 22px; padding: 0 6px; border-radius: 99px; background: var(--berry); color: #fff; font-size: .72rem; line-height: 20px; text-align: center; }

/* Admin lists and account pages */
.chips a small { margin-left: 6px; opacity: .7; }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 20px; margin: 0; }
.facts-grid dt { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.facts-grid dd { margin: 0; overflow-wrap: anywhere; }
.shots { display: flex; flex-wrap: wrap; gap: 10px; }
.shots img { width: 150px; height: 150px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }
.preview-box { display: flex; align-items: center; justify-content: center; min-height: 90px; padding: 12px; border: 2px dashed var(--line); border-radius: 14px; background: #fff; }
.preview-box img { max-height: 90px; width: auto; }
.panel-body { min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); transition: transform .2s; }
a.stat:hover { transform: translateY(-4px); }
.stat span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat strong { font-size: 1.35rem; }
.stat.attention { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bar i { display: block; width: 100%; min-height: 3px; border-radius: 8px 8px 3px 3px; background: linear-gradient(var(--primary), var(--berry)); animation: grow .8s cubic-bezier(.3,1.4,.5,1) both; transform-origin: bottom; }
.bar span { font-size: .7rem; color: var(--muted); }
@keyframes grow { from { transform: scaleY(0); } }
.mini { border-radius: 10px; object-fit: cover; width: 44px; height: 44px; }
.note { display: flex !important; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 14px 18px; margin-bottom: 10px; }
.note small { margin-left: auto; }
.note.unread { border-left: 6px solid var(--primary); }
.chat { display: flex !important; flex-direction: column; gap: 10px; max-height: 460px; overflow-y: auto; }
.bubble { align-self: flex-start; max-width: min(520px, 90%); background: var(--surface-2); border-radius: 16px 16px 16px 4px; padding: 10px 14px; animation: pop .3s; }
.bubble.me { align-self: flex-end; background: color-mix(in srgb, var(--accent) 18%, var(--surface)); border-radius: 16px 16px 4px 16px; }
.bubble p { margin: 0; }
.bubble small { color: var(--muted); font-size: .72rem; }
.flag { color: var(--warn); font-size: .8rem; font-weight: 700; }
@keyframes pop { from { opacity: 0; transform: scale(.9) translateY(8px); } }
.chat-form { align-items: flex-end; }
.thread { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.track { display: flex; list-style: none; padding: 0; margin: 0; gap: 6px; counter-reset: step; }
.track li { flex: 1; border-top: 5px solid var(--line); border-radius: 3px; padding-top: 6px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.track li.done { border-color: var(--accent); color: var(--accent); }
.rate { display: flex; flex-direction: row-reverse; justify-content: flex-end; border: 0; padding: 0; }
.rate legend { float: right; font-weight: 700; margin-left: 10px; }
.rate input { position: absolute; opacity: 0; width: 1px; }
.rate label { font-size: 2rem; color: var(--line); cursor: pointer; transition: transform .15s; }
.rate label:hover { transform: scale(1.2) rotate(8deg); }
.rate input:checked ~ label, .rate label:hover, .rate label:hover ~ label { color: #f2a20d; }
.rate input:focus-visible + label { outline: 3px solid var(--accent); }
.sticky-save { position: sticky; bottom: 16px; align-self: flex-start; }
.prose { max-width: 800px; }

/* 3D box used on empty and error pages */
.cube3d { width: 64px; height: 64px; margin: 24px auto 40px; position: relative; transform-style: preserve-3d; transform: rotateX(-25deg) rotateY(38deg); animation: spin 9s linear infinite; }
.cube3d i { position: absolute; inset: 0; border-radius: 8px; border: 2px solid rgba(255,255,255,.55); background: var(--primary); }
.cube3d i:nth-child(1) { transform: translateZ(32px); }
.cube3d i:nth-child(2) { transform: rotateY(180deg) translateZ(32px); }
.cube3d i:nth-child(3) { transform: rotateY(90deg) translateZ(32px); background: var(--berry); }
.cube3d i:nth-child(4) { transform: rotateY(-90deg) translateZ(32px); background: var(--berry); }
.cube3d i:nth-child(5) { transform: rotateX(90deg) translateZ(32px); background: var(--accent); }
.cube3d i:nth-child(6) { transform: rotateX(-90deg) translateZ(32px); background: var(--accent); }
@keyframes spin { from { transform: rotateX(-25deg) rotateY(0); } to { transform: rotateX(-25deg) rotateY(360deg); } }
.center-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; background: var(--plum); color: #fff; padding: 12px 22px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow-up); animation: pop .3s; white-space: nowrap; }

/* Shipment journey, newest first */
.timeline { list-style: none; margin: 4px 0; padding: 0 0 0 6px; }
.timeline li { position: relative; padding: 0 0 12px 20px; border-left: 3px solid var(--line); display: flex; flex-direction: column; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 5px; width: 13px; height: 13px; border-radius: 50%; background: var(--line); }
.timeline li:first-child::before { background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
.timeline li.problem::before { background: var(--bad); }
input.narrow { width: 110px; }
code { word-break: break-word; }

/* Printable packing slip */
.slip-page { background: #fff; color: #000; padding: 24px; }
.slip { max-width: 560px; margin: 0 auto 16px; border: 2px solid #000; border-radius: 10px; padding: 18px 22px; }
.slip header { display: flex; justify-content: space-between; gap: 12px; border-bottom: 2px dashed #000; padding-bottom: 8px; }
.slip section { border-bottom: 1px solid #999; padding: 10px 0; }
.slip section:last-child { border-bottom: 0; }
.slip h2 { margin: 4px 0; color: #000; }
.slip-page .no-print { text-align: center; }
@media print { .no-print { display: none !important; } }

/* Setup wizard */
.setup { max-width: 720px; margin: 30px auto; width: calc(100% - 32px); }
.setup ol.steps-bar { display: flex; list-style: none; padding: 0; gap: 8px; }
.steps-bar li { flex: 1; border-top: 6px solid var(--line); padding-top: 6px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.steps-bar li.on { border-color: var(--primary); color: var(--ink); }

/* Footer */
.foot { background: var(--plum); color: #d9d0f0; padding: 40px 0 20px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 24px; }
.foot h2 { color: #fff; font-size: 1rem; }
.foot-grid > div > a:not(.logo) { display: block; padding: 3px 0; }
.foot-grid a:hover { color: #ffb35c; }
.foot .logo { color: #fff; }
.copy { border-top: 1px solid rgba(255,255,255,.14); padding-top: 16px; margin-top: 24px; }
.dock { display: none; }

@media (max-width: 900px) {
  .top-row { flex-wrap: wrap; gap: 10px; }
  .search { order: 3; flex-basis: 100%; }
  .actions { margin-left: auto; }
  .hero-grid, .product-page, .layout-cart, .layout-side, .panel { grid-template-columns: minmax(0, 1fr); }
  .stage { min-height: 340px; }
  .sticky { position: static; }
  .panel-nav nav { display: flex; overflow-x: auto; }
  .panel-nav a { white-space: nowrap; }
  .panel-nav h2 { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .hide-sm { display: none !important; }
  .top { position: static; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .subcat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pcard-body { padding: 10px; }
  .price strong { font-size: 1rem; }
  .stage-hint { white-space: normal; width: 90%; text-align: center; }
  .hero-stats { gap: 16px; }
  .actions .icon-btn { width: 38px; height: 38px; }
  main { padding-bottom: 90px; }
  .foot { padding-bottom: 90px; }
  .dock { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: var(--surface); border-top: 1px solid var(--line); }
  .dock a { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; font-size: 1.15rem; }
  .dock span { font-size: .68rem; font-weight: 700; }
  .toast { bottom: 84px; }
}
.motion-btn { border: 1px solid currentColor; background: none; color: inherit; border-radius: 99px; font: inherit; font-size: .78rem; font-weight: 700; padding: 2px 10px; margin-top: 6px; cursor: pointer; }
.stage-hint .motion-btn { margin: 0 0 0 8px; }
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="on"]) *, :root:not([data-motion="on"]) *::before, :root:not([data-motion="on"]) *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
