/* Garden Rock Canna-Club — dark theme, orange + purple */
@font-face {
  font-family: 'Nunito';
  src: url('fonts/nunito.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}
:root {
  --bg: #0e0d12;
  --surface: #1a1721;
  --surface2: #221d2e;
  --border: #2b2540;
  --orange: #ef8f2e;
  --orange-d: #c96f1a;
  --purple: #a366c4;
  --purple-l: #c99ae0;
  --purple-d: #6b3f8f;
  --teal: #3a97a3;
  --text: #f0ebe4;
  --muted: #a49cc0;
  --danger: #d05555;
  --radius: 18px;
  --touch: 56px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
/* kill long-press magnifier / double-tap zoom / iOS callout on kiosk UI */
button, .btn, .card, .cat-tile, .highlight-card, .pill, .hero-card, a {
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
body {
  background:
    radial-gradient(900px 480px at 50% -140px, rgba(107,63,143,.30), transparent 70%),
    radial-gradient(1100px 700px at 105% 105%, rgba(58,151,163,.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 17px/1.55 'Nunito', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
svg { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--orange); }
main { max-width: 1200px; margin: 0 auto; padding: 0 16px 60px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(14,13,18,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
}
.logo {
  width: 44px; height: 44px; border-radius: 50%;
  box-shadow: 0 0 0 2px var(--orange-d), 0 0 14px rgba(239,143,46,.35);
}
.brand-link {
  display: flex; align-items: center; gap: 12px;
  flex: 1; min-width: 0; color: var(--text);
}
.brand-link:hover { color: var(--text); }
.site-name {
  font-weight: 800; letter-spacing: .04em; font-size: 1.05rem;
  color: var(--orange);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cart-btn {
  background: var(--purple-d); color: var(--text);
  padding: 10px 18px; border-radius: 999px; font-weight: 700;
  display: flex; align-items: center; gap: 8px; min-height: var(--touch);
}
.cart-btn:hover { background: var(--purple); color: var(--text); }
.cart-count {
  background: var(--orange); color: #181008;
  min-width: 26px; height: 26px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .85rem; padding: 0 6px;
}

/* ---------- gate ---------- */
.gate {
  min-height: 90vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 18px; padding: 24px;
}
.gate-wrap {
  position: relative; width: 100%; max-width: 420px;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 84px;               /* room for the bear's head */
}
.gate-bear {
  position: absolute; top: 0; left: 30px; width: 128px; z-index: 0;
  pointer-events: none;
}
.gate-card { position: relative; z-index: 1; }
.gate-logo { width: 130px; height: 130px; border-radius: 50%; box-shadow: 0 0 60px rgba(163,102,196,.35); }
.gate-title { color: var(--orange); letter-spacing: .06em; font-size: 1.5rem; }
.gate-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; width: 100%; max-width: 420px;
  display: flex; flex-direction: column; gap: 14px;
}
.gate-label { color: var(--muted); font-size: .9rem; text-align: left; }
.age-question { font-size: 1.35rem; font-weight: 700; }
.age-buttons { display: flex; gap: 12px; flex-direction: column; }
@media (min-width: 480px) { .age-buttons { flex-direction: row; } .age-buttons .btn { flex: 1; } }
.gate-warning { color: var(--muted); font-size: .8rem; }
.denied-msg { color: var(--danger); font-size: 1.1rem; }

/* ---------- inputs & buttons ---------- */
.input {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; font-size: 1rem; min-height: var(--touch);
}
.input:focus { outline: 2px solid var(--purple); border-color: var(--purple); }
.input.big { font-size: 1.15rem; padding: 16px 18px; }
.input.num { width: 90px; }
textarea.input { resize: vertical; }
select.input {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a366c4' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 38px; cursor: pointer;
}
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; cursor: pointer;
  font-weight: 700; font-size: 1rem; min-height: var(--touch);
  padding: 12px 22px; color: var(--text); background: var(--surface2);
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn { transition: background .15s, border-color .15s, transform .08s; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.cat-tile, .highlight-card, .pill, .card { transition: border-color .15s, box-shadow .15s; }
.cat-tile:active, .highlight-card:active { transform: scale(.985); }
.cat-tile, .highlight-card { transition: border-color .15s, transform .1s; }
.btn-primary { background: var(--orange); color: #181008; }
.btn-primary:hover:not(:disabled) { background: var(--orange-d); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.back-browse {
  display: inline-block; margin-top: 16px;
  color: var(--purple-l); font-weight: 700; font-size: .95rem;
}
.back-browse:hover { color: var(--orange); }
.btn-ghost:hover { border-color: var(--purple); }
.btn-danger { background: var(--danger); }
.btn-lg { font-size: 1.1rem; padding: 16px 28px; }
.btn-small { min-height: 40px; padding: 8px 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- hero / welcome card ---------- */
.hero-card {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin: 18px 0 6px; padding: 22px;
  background: linear-gradient(120deg, var(--surface) 55%, #251d38 140%);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.hero-logo {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--purple-d), 0 0 26px rgba(163,102,196,.45);
}
.hero-text { flex: 1; min-width: 200px; }
.hero-text h1 { color: var(--orange); font-size: 1.35rem; letter-spacing: .03em; }
.hero-text p { color: var(--muted); margin-top: 4px; }
.hero-steps {
  display: flex; gap: 18px; list-style: none; flex-wrap: wrap;
  counter-reset: step; width: 100%;
}
.hero-steps li {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 16px; flex: 1; min-width: 170px;
  font-size: .92rem; font-weight: 600;
}
.step-num {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--orange); color: #181008; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
@media (min-width: 860px) { .hero-steps { width: auto; flex: 2; } }

/* ---------- highlights (max 2 featured/deal cards) ---------- */
.highlights {
  display: grid; gap: 12px; margin: 18px 0 6px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .highlights.two { grid-template-columns: 1fr 1fr; } }
.highlight-card {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(120deg, var(--surface) 60%, #251d38 150%);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; color: var(--text);
}
.highlight-card:hover { border-color: var(--purple); color: var(--text); }
.highlight-card img {
  width: 96px; height: 96px; object-fit: cover;
  border-radius: 12px; border: 2px solid var(--border); flex-shrink: 0;
}
.hl-info { display: flex; flex-direction: column; gap: 3px; }
.hl-info strong { font-size: 1.15rem; }
.hl-cat { color: var(--muted); font-size: .85rem; }
.hl-price { color: var(--purple); font-weight: 800; font-size: 1.05rem; }

/* ---------- category tiles ---------- */
.browse-title { margin: 20px 0 12px; }
.cat-tiles {
  display: flex; gap: 12px; margin-bottom: 8px;
  overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: thin; scrollbar-color: var(--purple-d) transparent;
}
.cat-tiles::-webkit-scrollbar { height: 6px; }
.cat-tiles::-webkit-scrollbar-thumb { background: var(--purple-d); border-radius: 999px; }
.cat-tiles::-webkit-scrollbar-track { background: transparent; }
.cat-tile {
  flex: 1 0 140px; max-width: 220px; min-height: 120px;
  overflow: hidden; cursor: pointer;
  border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface2);
  display: flex; flex-direction: column; text-align: left;
  font: inherit; color: var(--text); padding: 0;
}
.tile-icon {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; padding: 10px 0 2px;
  background: radial-gradient(circle at 50% 60%, rgba(163,102,196,.22), transparent 68%);
}
.tile-icon .icon { color: var(--purple-l); }
.cat-tile.active .tile-icon .icon { color: var(--orange); }
.empty-icon { color: var(--purple-l); display: inline-flex; }
.tile-icon-img { width: 58px; height: 58px; border-radius: 50%; }
.cat-tile .tile-text {
  width: 100%; padding: 8px 12px 10px; text-align: center;
  display: flex; flex-direction: column; gap: 1px;
}
.tile-text strong { font-size: .98rem; }
.tile-count { color: var(--muted); font-size: .78rem; }
.cat-tile:hover { border-color: var(--purple); color: var(--text); }
.cat-tile.active { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange); }
.browse-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
  margin: 18px 0 8px;
}
.browse-head .section-title { margin: 0; }
@media (max-width: 720px) {
  .browse-tools { width: 100%; margin-left: 0; }
  .browse-tools #searchBox { flex: 1; max-width: none; min-width: 120px; }
}
.tag {
  font-size: .7rem; font-weight: 800; letter-spacing: .08em;
  padding: 4px 10px; border-radius: 999px; align-self: flex-start;
}
.tag-deal { background: var(--orange); color: #181008; }
.tag-feat { background: var(--purple); color: #fff; }

/* ---------- pills (admin nav / order status filters) ---------- */
.pill {
  white-space: nowrap; padding: 10px 20px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-weight: 600; min-height: var(--touch);
  display: inline-flex; align-items: center;
}
.pill.active, .pill:hover { background: var(--purple-d); border-color: var(--purple); color: #fff; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* ---------- product grid ---------- */
.grid {
  display: grid; gap: 14px; margin-top: 12px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 4px 18px rgba(0,0,0,.22);
}
.card:hover { border-color: var(--purple-d); }
.card-img { position: relative; aspect-ratio: 1; background: var(--surface2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 62%, rgba(14,13,18,.5));
}
.no-img {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
}
.no-img-logo { width: 56%; height: auto; border-radius: 50%; opacity: .22; filter: saturate(.85); }
.badge {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 12px; border-radius: 999px; font-size: .72rem; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase;
}
.badge-strain { background: var(--purple); color: #fff; }
.strain-indica { background: var(--purple-d); color: #fff; }
.strain-sativa { background: var(--orange); color: #181008; }
.strain-hybrid { background: var(--teal); color: #062b2f; }
.card-body { padding: 12px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.title-row { display: flex; align-items: flex-start; gap: 8px; }
.title-row h3 { flex: 1; font-size: .98rem; line-height: 1.25; font-weight: 600; }
.price-col { display: flex; flex-direction: column; align-items: flex-end; }
.price {
  color: var(--orange); font-weight: 800; font-size: 1.08rem;
  line-height: 1.2; white-space: nowrap;
}
.price-unit {
  color: var(--muted); font-size: .72rem; line-height: 1.2;
  max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.brand { color: var(--muted); font-size: .88rem; }
.potency { display: flex; gap: 8px; color: var(--teal); font-size: .82rem; font-weight: 700; }
.terps { display: flex; flex-wrap: wrap; gap: 5px; }
.terp {
  font-size: .68rem; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  color: var(--purple-l); background: color-mix(in srgb, var(--purple) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--purple) 45%, transparent);
  border-radius: 999px; padding: 2px 9px;
}
.add-form { margin-top: auto; display: flex; gap: 8px; align-items: stretch; }
.variant-select { flex: 1; min-width: 0; min-height: 48px; font-size: .95rem; }
.add-btn {
  flex: 0 0 48px; width: 48px; min-height: 48px; padding: 0;
  font-size: 1.5rem; font-weight: 700; line-height: 1;
}
.add-btn:disabled { font-size: .75rem; width: auto; flex-basis: 72px; padding: 0 8px; }
.oos { color: var(--danger); font-weight: 700; }
.deal-note {
  color: var(--orange); font-size: .85rem; font-weight: 700;
}
.deal-tag {
  color: var(--orange); font-size: .75rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em;
}
.deal-hint { color: var(--muted); font-size: .78rem; }

/* ---------- cart ---------- */
.page-title { margin: 22px 0 14px; }
.cart-list { display: flex; flex-direction: column; gap: 10px; }
.cart-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px;
}
.cart-thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 10px; }
.cart-info { flex: 1; display: flex; flex-direction: column; }
.cart-variant { color: var(--muted); font-size: .9rem; }
.cart-price { color: var(--purple); font-size: .85rem; }
.cart-qty { display: flex; align-items: center; gap: 4px; }
.qty-btn {
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text); font-size: 1.3rem; cursor: pointer;
}
.qty-btn:hover { border-color: var(--purple); }
.qty-val { min-width: 30px; text-align: center; font-weight: 700; }
.cart-line-total { min-width: 64px; text-align: right; font-weight: 700; }
.remove-btn {
  width: 48px; height: 48px; border: 0; border-radius: 12px;
  background: var(--surface2); color: var(--muted); font-size: 1.5rem; cursor: pointer;
  flex-shrink: 0;
}
.remove-btn:hover { color: var(--danger); }
.cart-total-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 1.3rem; margin: 18px 0 4px;
}
.cart-total-row strong { color: var(--orange); }
.cart-note { color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.empty-cart {
  text-align: center; padding: 60px 20px;
  display: flex; flex-direction: column; gap: 16px; align-items: center;
  color: var(--muted); font-size: 1.05rem;
}
.empty-cart[hidden] { display: none; }
.empty-cart .empty-icon { font-size: 2.6rem; }

.checkout-form {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 14px; max-width: 560px;
}
.section-title { font-size: 1.05rem; color: var(--orange); margin-bottom: 4px; }
.f-label { display: flex; flex-direction: column; gap: 6px; font-size: 1rem; color: var(--muted); }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* ---------- confirmation ---------- */
.confirm { display: flex; justify-content: center; padding-top: 30px; }
.confirm-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; max-width: 460px; width: 100%; text-align: center;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.confirm-check {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--teal); color: #fff; font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  animation: pop .35s ease-out;
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.confirm-sub { color: var(--muted); }
.invoice-no {
  font-size: 1.6rem; font-weight: 800; letter-spacing: .06em;
  color: var(--orange); background: var(--bg); padding: 12px 20px;
  border-radius: 10px; border: 1px dashed var(--purple);
}
.confirm-items { list-style: none; color: var(--muted); font-size: .92rem; }
.confirm-total { font-size: 1.15rem; }
.confirm-note { color: var(--muted); font-size: .85rem; }
.auto-reset { color: var(--muted); font-size: .8rem; }

/* ---------- admin ---------- */
body.admin { background: #0b0a0f; }
.admin-main { max-width: 1100px; }
.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.admin-nav a {
  padding: 10px 14px; border-radius: 10px; color: var(--text);
  font-weight: 600; font-size: .95rem;
}
.admin-nav a.active, .admin-nav a:hover { background: var(--surface2); color: var(--orange); }
.nav-logout { color: var(--muted) !important; }
.pw-toggle {
  margin-left: auto; background: none; border: 0; cursor: pointer;
  color: var(--muted); font-weight: 600; font-size: .95rem; padding: 10px 14px;
}
.pw-toggle:hover { color: var(--orange); }
.pw-panel {
  position: absolute; right: 14px; top: calc(100% + 6px); z-index: 60;
  display: flex; flex-direction: column; gap: 10px; min-width: 340px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  box-shadow: 0 14px 34px rgba(0,0,0,.55);
}
.pw-row { display: flex; gap: 8px; }
.pw-row .input { flex: 1; min-width: 0; }
.pill-badge {
  background: var(--orange); color: #181008; border-radius: 999px;
  padding: 1px 8px; font-size: .8rem;
}
.admin-title-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 20px 0 14px; }
.back-link { color: var(--muted); display: inline-block; margin-top: 16px; }
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 16px;
}
.form-panel label { margin-bottom: 0; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin-bottom: 14px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.check { display: flex; align-items: center; gap: 10px; margin: 10px 0; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--orange); }
.img-row { display: flex; align-items: center; gap: 14px; margin: 12px 0; flex-wrap: wrap; }
.preview-img { width: 90px; height: 90px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.table tfoot th { color: var(--text); }
.table .thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.row-off { opacity: .45; }
.inline { display: inline; }
.btn-cell { white-space: nowrap; }
.qa-table .input { min-height: 40px; padding: 4px 10px; font-size: .9rem; }
#prodSearch { margin: 14px 0; max-width: 420px; }

/* variant editor: scroll sideways instead of crushing columns on narrow screens */
#variantTable { min-width: 860px; }
#variantTable select.input { min-width: 90px; }
#variantTable .input { min-height: 42px; padding: 4px 8px; font-size: .9rem; }
#variantTable td { padding: 6px; }
.input.flash { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(58,151,163,.25); }
.reason-chip { cursor: pointer; }

/* iOS-style edit mode: controls hidden until Edit is tapped */
#prodTable .edit-only { display: none; }
#prodTable.editing .edit-only { display: table-cell; }
#prodTable.editing td .edit-only { display: inline; }
.ios-actions { display: flex; gap: 14px; align-items: center; }
.ios-btn {
  background: none; border: 0; cursor: pointer; padding: 8px 4px;
  color: var(--purple-l); font-size: 1rem; font-weight: 600;
}
.ios-btn.done { color: var(--teal); }
.ios-mini {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--purple-l); font-size: .8rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.ios-mini:hover { border-color: var(--purple); }

/* pools + gate password manager */
.sub-title { font-size: .95rem; color: var(--purple-l); margin: 18px 0 8px; }
.pool-rows { display: flex; flex-direction: column; gap: 8px; }
.pool-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px;
}
.pool-name { font-size: .92rem; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form .input { width: 180px; }
.pool-add { display: flex; gap: 8px; margin-top: 4px; }
.pool-add .input { flex: 1; }
.pool-add select.input { flex: 0 0 130px; }
.pool-checks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.pool-checks label {
  display: inline-flex; align-items: center; gap: 5px; font-size: .85rem;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 12px; cursor: pointer;
}
.pool-checks label.on { border-color: var(--teal); color: var(--teal); }
.pool-tag {
  font-size: .68rem; font-weight: 700; letter-spacing: .4px;
  background: var(--purple); color: #fff; border-radius: 6px;
  padding: 2px 6px; vertical-align: middle;
}

/* pool access matrix */
.pool-matrix th { text-align: center; }
.pool-matrix th:first-child, .pool-matrix td:first-child { text-align: left; }
.pool-matrix td { text-align: center; padding: 5px 10px; }
.pm-head { min-width: 76px; }
.pm-cat td {
  background: var(--surface2); font-weight: 700;
  border-top: 2px solid var(--border);
}
.pm-toggle { cursor: pointer; user-select: none; }
.pm-caret { display: inline-block; width: 18px; color: var(--teal); }
.pm-count {
  font-size: .78rem; font-weight: 500; color: var(--muted);
  background: var(--surface); border-radius: 10px; padding: 1px 8px; margin-left: 4px;
}
.pm-prod td:first-child { padding-left: 26px; font-size: .92rem; }
.pm-restricted td:first-child::after { content: ' 🔒'; }
.pm-restricted td { color: var(--orange); }
#dirtyBar {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: var(--orange); color: #1a0f00; font-weight: 600;
  padding: 10px 22px; border-radius: 24px; z-index: 60;
  box-shadow: 0 4px 18px rgba(0,0,0,.45);
}
.viewas-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70;
  background: var(--teal); color: #04181b; font-weight: 600;
  text-align: center; padding: 6px 14px; font-size: .9rem;
}
.viewas-bar a { color: #04181b; margin-left: 10px; text-decoration: underline; }
.pool-matrix input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--teal); cursor: pointer; }
.del-ios {
  width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--danger); color: #fff; font-size: 1.2rem; font-weight: 700;
  line-height: 1; padding-bottom: 3px; vertical-align: middle;
}
.del-form { display: inline-flex; align-items: center; gap: 8px; margin: 4px 12px 4px 0; }

.icon-btn {
  background: transparent; border: 0; color: var(--muted);
  font-size: 1.3rem; cursor: pointer; padding: 6px;
}
.icon-btn.on { color: var(--orange); }
.icon-btn:hover { color: var(--danger); }

/* toggle switch */
.switch {
  width: 52px; height: 30px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface2); cursor: pointer; position: relative; padding: 0;
}
.switch span {
  position: absolute; top: 3px; left: 4px; width: 22px; height: 22px;
  border-radius: 50%; background: var(--muted); transition: all .18s;
}
.switch.on { background: var(--purple-d); border-color: var(--purple); }
.switch.on span { left: 24px; background: var(--orange); }

.status {
  padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em;
}
.status-new { background: var(--purple-d); color: #fff; }
.status-processed { background: var(--teal); color: #062b2f; }
.status-cancelled { background: #3a3a3a; color: var(--muted); }
.big-status { font-size: .95rem; padding: 8px 18px; }

.order-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .order-grid { grid-template-columns: 3fr 2fr; } }
.detail-list { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; font-size: .95rem; }
.detail-list dt { color: var(--muted); }

/* stock page */
.scan-log { list-style: none; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.scan-log li { padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.scan-ok { background: rgba(58,151,163,.18); border: 1px solid var(--teal); }
.scan-err { background: rgba(208,85,85,.15); border: 1px solid var(--danger); }
.low-qty { color: var(--danger); font-weight: 800; }
.delta-pos { color: var(--teal); font-weight: 700; }
.delta-neg { color: var(--danger); font-weight: 700; }

/* ---------- misc ---------- */
.flash {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  z-index: 50; padding: 14px 22px; border-radius: 12px; font-weight: 700;
  background: var(--teal); color: #062b2f; box-shadow: 0 8px 30px rgba(0,0,0,.5);
  max-width: 92vw;
}
.flash-err { background: var(--danger); color: #fff; }
.muted { color: var(--muted); }
code { background: var(--surface2); padding: 2px 6px; border-radius: 6px; }

/* kiosk / large screens: roomier cards */
@media (min-width: 1100px) {
  .card-body h3, .title-row h3 { font-size: 1.1rem; }
}

/* ---------- floating cart bar + added toast ---------- */
.cart-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; background: var(--surface);
  border-top: 2px solid var(--orange);
  box-shadow: 0 -4px 18px rgba(0,0,0,.5);
}
.cart-bar[hidden] { display: none; }
#cartBarInfo { font-weight: 700; font-size: .95rem; color: var(--purple-l); }
.cart-bar .btn { padding: 10px 22px; }
.cart-toast {
  position: fixed; bottom: 74px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--teal); color: #fff; font-weight: 600; font-size: .9rem;
  padding: 10px 18px; border-radius: 999px; z-index: 70;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  box-shadow: 0 6px 20px rgba(0,0,0,.5); white-space: nowrap; max-width: 92vw;
  overflow: hidden; text-overflow: ellipsis;
}
.cart-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.cart-toast a { color: #fff; text-decoration: underline; }
.shop-main { padding-bottom: 80px; }

/* ---------- browse tools (search) ---------- */
.browse-tools { display: flex; gap: 8px; align-items: center; margin-left: auto; }
#searchBox { max-width: 170px; padding: 9px 12px; font-size: .95rem; }
#sortBox { width: auto; min-height: 44px; padding: 9px 34px 9px 12px; font-size: .95rem; }
@media (max-width: 560px) {
  #searchBox { max-width: 120px; }
  #sortBox { font-size: .88rem; }
}

/* ---------- product detail overlay ---------- */
body.detail-open { overflow: hidden; }
.detail-overlay {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(9, 8, 14, .72); backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 4vh 14px; overflow-y: auto;
}
.detail-overlay[hidden] { display: none; }
.detail-shell { position: relative; width: min(560px, 94vw); }
.detail-shell > .card { box-shadow: 0 24px 70px rgba(0,0,0,.55); max-height: 88vh; overflow-y: auto; }
.detail-shell .card-img { max-height: 52vh; }
.detail-shell .card-img img { object-fit: contain; max-height: 52vh; }
.detail-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(18,16,26,.85); color: #fff; border: 1px solid var(--border);
  font-size: 1.25rem; cursor: pointer;
}
.detail-shell .card-desc { display: block; }
.card-desc { display: none; font-size: .92rem; color: var(--muted); line-height: 1.55; }
.card-img { cursor: zoom-in; }
.title-row h3 { cursor: pointer; }
.price-was {
  color: var(--muted); font-size: .72rem; line-height: 1.2;
  text-decoration: line-through; text-decoration-color: var(--danger);
}
.price-ppg {
  color: var(--teal); font-size: .72rem; line-height: 1.2; font-weight: 700;
}
