/* OxiShop — commerce UI built entirely on zap's design tokens (var(--zap-*)),
   so the dark/light switch and theme swap restyle the whole store. */
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; }

.zap { min-height: 100vh; display: flex; flex-direction: column; }
main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 22px 18px 60px; flex: 1; }
.muted { color: var(--zap-muted); }

/* ── header ───────────────────────────────────────────────────────────────── */
.nav { background: var(--zap-surface); border-bottom: 1px solid var(--zap-border); position: sticky; top: 0; z-index: 50; }
.nav__inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 12px 18px; }
.brand { font-size: 22px; font-weight: 800; white-space: nowrap; }
.nav__links { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.nav__cart { font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.badge { background: var(--zap-primary); color: var(--zap-primary-contrast); border-radius: 999px;
  font-size: 12px; font-weight: 700; min-width: 19px; height: 19px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center; }

.search { position: relative; flex: 1; max-width: 640px; display: flex; }
.search__input { flex: 1; font: inherit; padding: 10px 14px; border: 1px solid var(--zap-border);
  border-radius: var(--zap-radius-sm) 0 0 var(--zap-radius-sm); background: var(--zap-elevated); color: var(--zap-text); }
.search__input:focus { outline: none; border-color: var(--zap-primary); box-shadow: 0 0 0 3px var(--zap-primary-soft); }
.search__btn { border: 1px solid var(--zap-primary); background: var(--zap-primary); color: var(--zap-primary-contrast);
  padding: 0 16px; border-radius: 0 var(--zap-radius-sm) var(--zap-radius-sm) 0; cursor: pointer; font-size: 16px; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60; }
.suggest__box { background: var(--zap-surface); border: 1px solid var(--zap-border); border-radius: var(--zap-radius-sm);
  box-shadow: var(--zap-shadow); overflow: hidden; }
.suggest__row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; }
.suggest__row:hover, .suggest__row.is-hi { background: var(--zap-primary-soft); }
.suggest__emoji { font-size: 18px; }
.suggest__t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* mega menu */
.catstrip { display: flex; gap: 4px; padding: 4px 18px; max-width: 1180px; margin: 0 auto;
  font-size: 14px; border-top: 1px solid var(--zap-border); flex-wrap: wrap; }
.dept { position: relative; }
.dept__link { display: inline-block; padding: 9px 12px; font-weight: 600; color: var(--zap-text); border-radius: 8px; white-space: nowrap; }
.dept__link:hover { background: var(--zap-primary-soft); color: var(--zap-primary); }
.dept__sale { color: #dc2626; }
.megamenu { position: absolute; top: 100%; left: 0; min-width: 200px; z-index: 70;
  background: var(--zap-surface); border: 1px solid var(--zap-border); border-radius: var(--zap-radius-sm);
  box-shadow: var(--zap-shadow); padding: 6px; opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .12s, transform .12s; }
.dept:hover .megamenu { opacity: 1; visibility: visible; transform: translateY(0); }
.megamenu a { display: block; padding: 8px 12px; border-radius: 7px; color: var(--zap-text); white-space: nowrap; }
.megamenu a:hover { background: var(--zap-primary-soft); color: var(--zap-primary); }
.megamenu__all { font-weight: 700; border-bottom: 1px solid var(--zap-border); border-radius: 7px 7px 0 0; margin-bottom: 4px; }
.chip--sale { color: #dc2626; border-color: #fecaca; }

/* color swatches + size buttons */
.swatches { display: flex; gap: 5px; }
.swatch { width: 15px; height: 15px; border-radius: 999px; border: 1px solid rgba(0,0,0,.15); display: inline-block; }
.swatch--lg { width: 30px; height: 30px; }
.swatch--pick { cursor: pointer; padding: 0; outline-offset: 2px; }
.swatch--pick.is-on { outline: 2px solid var(--zap-primary); }
.variant { margin: 14px 0; }
.variant__label { display: block; font-size: 13px; color: var(--zap-muted); margin-bottom: 8px; }
.swatchpick, .sizepick { display: flex; flex-wrap: wrap; gap: 8px; }
.size-b { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 38px; padding: 0 10px;
  border: 1px solid var(--zap-border); border-radius: 10px; font-weight: 600; font-size: 14px; background: var(--zap-surface); color: var(--zap-text); cursor: pointer; }
.size-b--pick:hover { border-color: var(--zap-primary); }
.size-b.is-on { border-color: var(--zap-primary); background: var(--zap-primary); color: var(--zap-primary-contrast); }
/* no-JS radio fallbacks: hide the input, style the sibling */
.swatch-r input, .size-r input { position: absolute; opacity: 0; pointer-events: none; }
.swatch-r input:checked + .swatch { outline: 2px solid var(--zap-primary); }
.size-r input:checked + .size-b { border-color: var(--zap-primary); background: var(--zap-primary); color: var(--zap-primary-contrast); }
.swatch-r, .size-r { display: inline-flex; cursor: pointer; }
/* stacked: qty stepper on top, full-width Add to cart below it */
.buyrow { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin-top: 18px; max-width: 320px; }
.qtybox-wrap { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--zap-border); border-radius: 999px; padding: 4px; align-self: flex-start; }
.buyrow .zap-btn, .buyrow .btn { width: 100%; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }

/* search results: filter sidebar + grid */
.results { display: grid; grid-template-columns: 248px 1fr; gap: 24px; align-items: start; }
.results__main { min-width: 0; }
.sidebar { position: sticky; top: 128px; display: flex; flex-direction: column; gap: 14px; }
.facets__title { font-weight: 700; margin-bottom: 8px; }

.facetnav { background: var(--zap-surface); border: 1px solid var(--zap-border); border-radius: var(--zap-radius); padding: 14px; }
.facetnav a { display: block; padding: 7px 9px; border-radius: 8px; color: var(--zap-muted); font-size: 14px; }
.facetnav a:hover { background: var(--zap-primary-soft); color: var(--zap-primary); }
.facetnav a.on { background: var(--zap-primary-soft); color: var(--zap-primary); font-weight: 600; }

.filters { background: var(--zap-surface); border: 1px solid var(--zap-border); border-radius: var(--zap-radius); padding: 6px 14px 14px; }
.filters__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--zap-border); }
.filters__clear { color: var(--zap-primary); font-size: 13px; font-weight: 600; }
.filters__clear:hover { text-decoration: underline; }
.facet { border-bottom: 1px solid var(--zap-border); }
.facet:last-of-type { border-bottom: 0; }
.facet > summary { list-style: none; cursor: pointer; font-weight: 600; padding: 12px 0; display: flex; justify-content: space-between; align-items: center; }
.facet > summary::-webkit-details-marker { display: none; }
.facet > summary::after { content: "–"; color: var(--zap-muted); font-size: 18px; }
.facet:not([open]) > summary::after { content: "+"; }
.facet__body { padding-bottom: 12px; }
.facet__scroll { max-height: 230px; overflow-y: auto; }
.facet__opt { display: flex; align-items: center; gap: 9px; padding: 5px 4px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.facet__opt:hover { background: var(--zap-primary-soft); }
.facet__opt input { accent-color: var(--zap-primary); width: 16px; height: 16px; flex: none; }
.facet__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facet__count { color: var(--zap-muted); font-size: 13px; }
.slider-wrap { padding: 14px 8px 4px; }
.price-vals { display: flex; justify-content: space-between; font-weight: 600; font-size: 13px; margin: 2px 2px 12px; color: var(--zap-muted); }
.price-facet { display: flex; align-items: center; gap: 8px; }
.price-in { width: 100%; min-width: 0; font: inherit; padding: 8px 9px; border: 1px solid var(--zap-border); border-radius: var(--zap-radius-sm); background: var(--zap-elevated); color: var(--zap-text); }
.btn--sm { padding: 8px 12px; font-size: 14px; flex: none; }

/* ── hero / chips ─────────────────────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: 1.4fr .6fr; gap: 20px; align-items: center;
  background: var(--zap-surface); border: 1px solid var(--zap-border); border-radius: var(--zap-radius);
  padding: 34px; box-shadow: var(--zap-shadow); margin-bottom: 22px; }
.hero h1 { font-size: 34px; line-height: 1.1; margin-bottom: 10px; }
.hero p { color: var(--zap-muted); max-width: 52ch; margin: 0 0 18px; }
.hero__art { font-size: 110px; text-align: center; }
.cats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.chip { background: var(--zap-surface); border: 1px solid var(--zap-border); border-radius: 999px; padding: 7px 15px; font-size: 14px; font-weight: 600; }
.chip:hover { border-color: var(--zap-primary); color: var(--zap-primary); }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 0 16px; }
.sec-head h2 { font-size: 21px; }

/* ── product grid + card ──────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; }
.card { background: var(--zap-surface); border: 1px solid var(--zap-border); border-radius: var(--zap-radius);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: var(--zap-shadow); transform: translateY(-2px); }
.card__link { display: block; }
.card__img { position: relative; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; font-size: 64px; overflow: hidden; }
.card__img img, .pdp__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card__off { position: absolute; top: 8px; left: 8px; background: #dc2626; color: #fff; font-size: 12px; font-weight: 700; padding: 3px 7px; border-radius: 6px; }
.card__off--lg { font-size: 14px; padding: 5px 10px; }
.card__brand { color: var(--zap-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 12px 14px 0; }
.card__title { font-weight: 600; padding: 2px 14px 0; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.card__body { padding: 6px 14px 14px; display: flex; flex-direction: column; gap: 7px; margin-top: auto; }
.card__price { display: flex; align-items: baseline; gap: 8px; }
.price { font-size: 20px; font-weight: 800; }
.price--lg { font-size: 30px; }
.list { color: var(--zap-muted); text-decoration: line-through; font-size: 14px; }
.save { color: #16a34a; font-weight: 700; font-size: 14px; }
.prime { color: var(--zap-primary); font-size: 13px; font-weight: 600; }

.rating { font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.rating__stars { color: #f59e0b; letter-spacing: 1px; }

/* ── buttons ──────────────────────────────────────────────────────────────── */
.btn { font: inherit; font-weight: 600; border: 1px solid var(--zap-border); background: var(--zap-elevated);
  color: var(--zap-text); border-radius: 999px; padding: 9px 16px; cursor: pointer; text-align: center; }
.btn:hover { border-color: var(--zap-primary); }
.btn--primary { background: var(--zap-primary); border-color: var(--zap-primary); color: var(--zap-primary-contrast); }
.btn--primary:hover { filter: brightness(1.07); }
.btn--add { background: var(--zap-primary); border-color: var(--zap-primary); color: var(--zap-primary-contrast); }
.btn--add:hover { filter: brightness(1.06); }
.btn--lg { padding: 12px 22px; font-size: 16px; }
.btn--block { display: block; width: 100%; }

/* ── product detail page ──────────────────────────────────────────────────── */
.crumbs { font-size: 13px; color: var(--zap-muted); margin-bottom: 16px; }
.crumbs a:hover { color: var(--zap-primary); }
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.pdp__gallery { display: flex; flex-direction: column; gap: 10px; }
.pdp__img { position: relative; aspect-ratio: 1; border-radius: var(--zap-radius); display: flex; align-items: center; justify-content: center; font-size: 150px; overflow: hidden; }
.pdp__thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.pdp__thumb { width: 64px; height: 64px; padding: 0; border: 2px solid var(--zap-border); border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--zap-surface); }
.pdp__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp__thumb:hover { border-color: var(--zap-primary); }
.pdp__thumb.is-on { border-color: var(--zap-primary); box-shadow: 0 0 0 2px var(--zap-primary-soft); }

/* admin gallery manager */
.gallery-mgr { margin-top: 16px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.gallery-item { position: relative; aspect-ratio: 1; border-radius: var(--zap-radius-sm); overflow: hidden; border: 1px solid var(--zap-border); }
.gallery-item.is-primary { border-color: var(--zap-primary); box-shadow: 0 0 0 2px var(--zap-primary-soft); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-badge { position: absolute; top: 6px; left: 6px; background: var(--zap-primary); color: var(--zap-primary-contrast); font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.gallery-actions { position: absolute; bottom: 6px; right: 6px; display: flex; gap: 4px; }
.gallery-actions .btn { background: rgba(0,0,0,.55); border: 0; color: #fff; backdrop-filter: blur(2px); }
.gallery-actions .btn--danger:hover { background: #dc2626; color: #fff; }
.gallery-actions .btn:hover { background: rgba(0,0,0,.8); }
/* admin photo field */
.photo-field { display: flex; gap: 16px; align-items: flex-start; }
.photo-field__preview { width: 110px; height: 110px; object-fit: cover; border-radius: 12px; border: 1px solid var(--zap-border); flex: none; }
.photo-field__none { width: 110px !important; height: 110px !important; font-size: 48px !important; flex: none; }
.photo-field__ctl { display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.photo-field__ctl input[type="file"] { font: inherit; }
.pdp__info h1 { font-size: 27px; margin: 6px 0 10px; }
.pdp__blurb { color: var(--zap-muted); margin: 12px 0; }
.pdp__price { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 6px; }
.stock { font-weight: 600; color: #16a34a; }
.stock--low { color: #d97706; }
.pdp__desc { margin-top: 22px; border-top: 1px solid var(--zap-border); padding-top: 18px; }
.pdp__desc p { color: var(--zap-text); line-height: 1.6; }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tags li { background: var(--zap-elevated); border: 1px solid var(--zap-border); border-radius: 999px; padding: 4px 11px; font-size: 13px; color: var(--zap-muted); }

.buybox { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.qtybox { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--zap-border); border-radius: 999px; padding: 4px; }
.qtybox__b { width: 32px; height: 32px; border-radius: 999px; border: 0; background: var(--zap-elevated); color: var(--zap-text); font-size: 18px; cursor: pointer; }
.qtybox__b:hover { background: var(--zap-primary-soft); }
.qtybox__n { min-width: 28px; text-align: center; font-weight: 700; }
.qtybox__in { width: 56px; font: inherit; text-align: center; border: 1px solid var(--zap-border); border-radius: var(--zap-radius-sm); padding: 6px; background: var(--zap-elevated); color: var(--zap-text); }

/* ── cart ─────────────────────────────────────────────────────────────────── */
.cartwrap, .checkout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.cartlist { display: flex; flex-direction: column; gap: 14px; }
.cartline { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; align-items: center;
  background: var(--zap-surface); border: 1px solid var(--zap-border); border-radius: var(--zap-radius); padding: 14px; }
.cartline__img { width: 84px; height: 84px; border-radius: var(--zap-radius-sm); display: flex; align-items: center; justify-content: center; font-size: 40px; overflow: hidden; }
.cartline__img img, .drawerline__img img { width: 100%; height: 100%; object-fit: cover; }
.cartline__title { font-weight: 600; }
.cartline__ctl { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.cartline__price { font-weight: 800; font-size: 18px; }
.inlineform { display: inline; }
.linkbtn { background: none; border: 0; color: var(--zap-primary); cursor: pointer; font: inherit; padding: 0; }
.linkbtn:hover { text-decoration: underline; }

.summary { background: var(--zap-surface); border: 1px solid var(--zap-border); border-radius: var(--zap-radius); padding: 18px; box-shadow: var(--zap-shadow); position: sticky; top: 92px; }
.summary__row { display: flex; justify-content: space-between; margin: 8px 0; }
.summary__line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin: 6px 0; color: var(--zap-muted); }
.summary__total { font-size: 19px; border-top: 1px solid var(--zap-border); padding-top: 12px; margin-top: 12px; }
.summary hr { border: 0; border-top: 1px solid var(--zap-border); margin: 12px 0; }

/* ── checkout / confirm ───────────────────────────────────────────────────── */
.card-box { background: var(--zap-surface); border: 1px solid var(--zap-border); border-radius: var(--zap-radius); padding: 24px; box-shadow: var(--zap-shadow); }
.checkout__form h3 { margin: 18px 0 10px; }
.checkout__form h3:first-child { margin-top: 0; }
.checkout__form label { display: block; margin-bottom: 12px; font-weight: 600; font-size: 14px; }
.checkout__form input, .checkout__form textarea { width: 100%; font: inherit; margin-top: 5px; padding: 10px 12px;
  border: 1px solid var(--zap-border); border-radius: var(--zap-radius-sm); background: var(--zap-elevated); color: var(--zap-text); font-weight: 400; }
.checkout__form input:focus, .checkout__form textarea:focus { outline: none; border-color: var(--zap-primary); box-shadow: 0 0 0 3px var(--zap-primary-soft); }

.confirm { max-width: 620px; margin: 0 auto; text-align: center; }
.confirm__check { width: 64px; height: 64px; border-radius: 999px; background: #16a34a; color: #fff; font-size: 34px;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.confirm h1 { margin-bottom: 8px; }
.confirm__ship { text-align: left; background: var(--zap-elevated); border-radius: var(--zap-radius-sm); padding: 14px; margin: 18px 0; }
.confirm .summary { box-shadow: none; text-align: left; margin: 18px 0; position: static; }

/* ── cart drawer ──────────────────────────────────────────────────────────── */
.drawerbody { display: flex; flex-direction: column; }
.drawerline { display: grid; grid-template-columns: 60px 1fr auto; gap: 14px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--zap-border); }
.drawerline:first-child { padding-top: 4px; }
.drawerline:last-child { border-bottom: 0; }
.drawerline__img { width: 60px; height: 60px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 30px; flex: none; overflow: hidden; }
.drawerline__main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.drawerline__title { font-weight: 600; font-size: 14px; line-height: 1.3; color: var(--zap-text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.drawerline__title:hover { color: var(--zap-primary); }
.drawerline__sub { color: var(--zap-muted); font-size: 12.5px; }
.drawerline__actions { display: flex; align-items: center; gap: 14px; margin-top: 2px; }
.drawerline__price { font-weight: 800; font-size: 15px; white-space: nowrap; align-self: center; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--zap-border); border-radius: 999px; }
.stepper__b { width: 30px; height: 30px; border: 0; background: transparent; color: var(--zap-text);
  font-size: 17px; line-height: 1; cursor: pointer; border-radius: 999px; }
.stepper__b:hover { background: var(--zap-primary-soft); color: var(--zap-primary); }
.stepper__n { min-width: 30px; text-align: center; font-weight: 700; font-size: 14px; }

/* footer: full-width block (override theme's right-aligned flex foot) */
.zap-drawer__foot { display: block; padding: 16px 18px; }
.drawerfoot { display: flex; flex-direction: column; gap: 12px; }
.drawerfoot .summary__total { margin: 0; padding: 0; border: 0; font-size: 18px; }
.drawer__viewcart { display: block; text-align: center; }
.zap-drawer__foot .btn--primary,
.zap-drawer__foot .zap-btn { width: 100%; }

/* pagination */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 28px 0 6px; }
.pager__page, .pager__btn { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px;
  border: 1px solid var(--zap-border); border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--zap-text); background: var(--zap-surface); }
.pager__page:hover, .pager__btn:hover { border-color: var(--zap-primary); color: var(--zap-primary); }
.pager__page.is-current { background: var(--zap-primary); border-color: var(--zap-primary); color: var(--zap-primary-contrast); }
.pager__btn.is-disabled { color: var(--zap-muted); opacity: .5; pointer-events: none; }
.pager__gap { padding: 0 4px; color: var(--zap-muted); }
.pager__info { text-align: center; font-size: 13px; margin: 4px 0 0; }

.empty { text-align: center; color: var(--zap-muted); padding: 60px 0; font-size: 17px; }
.empty a { color: var(--zap-primary); font-weight: 600; }
.sortbar select { font: inherit; padding: 7px 10px; border-radius: var(--zap-radius-sm); border: 1px solid var(--zap-border); background: var(--zap-elevated); color: var(--zap-text); margin-left: 6px; }

/* ── footer ───────────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--zap-border); background: var(--zap-surface); padding: 22px 18px; text-align: center; font-size: 14px; }
.foot .muted { margin-top: 4px; }
.theme-bar { display: flex; align-items: center; gap: 8px; }
.theme-bar .zap-sel { min-width: 130px; }
.iconbtn { width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--zap-border);
  background: var(--zap-elevated); cursor: pointer; font-size: 17px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.iconbtn:hover { border-color: var(--zap-primary); background: var(--zap-primary-soft); }
.zap-sel__opt { white-space: nowrap; }
/* Let the dropdown grow to fit the longest label (e.g. "macOS Aqua") instead of
   being pinned to the trigger width — kills the horizontal scrollbar. */
.zap-sel__panel { right: auto; min-width: 100%; width: max-content; max-width: 280px; overflow-x: hidden; }

/* ── admin module ─────────────────────────────────────────────────────────── */
.admin { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin__nav { background: var(--zap-surface); border-right: 1px solid var(--zap-border);
  padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.admin__brand { font-weight: 800; font-size: 18px; }
.admin__brand span { color: var(--zap-primary); font-weight: 600; }
.admin__nav nav { display: flex; flex-direction: column; gap: 4px; }
.admin__nav nav a { padding: 9px 12px; border-radius: 9px; font-weight: 600; color: var(--zap-muted); }
.admin__nav nav a:hover { background: var(--zap-primary-soft); color: var(--zap-primary); }
.admin__nav nav a.on { background: var(--zap-primary); color: var(--zap-primary-contrast); }
.admin__navfoot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--zap-muted); }
.admin__main { padding: 26px 30px 60px; min-width: 0; max-width: 1100px; }
.admin__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 18px 0 16px; flex-wrap: wrap; }
.admin__head h1 { font-size: 24px; } .admin__head h2 { font-size: 18px; }
.admin__actions { display: flex; gap: 10px; align-items: center; }
.admin-search { display: flex; gap: 6px; }
.admin-search input { font: inherit; padding: 8px 11px; border: 1px solid var(--zap-border);
  border-radius: var(--zap-radius-sm); background: var(--zap-elevated); color: var(--zap-text); min-width: 240px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 26px; }
.stat { background: var(--zap-surface); border: 1px solid var(--zap-border); border-radius: var(--zap-radius); padding: 16px; }
.stat__n { font-size: 24px; font-weight: 800; }
.stat__l { color: var(--zap-muted); font-size: 13px; margin-top: 2px; }
.stat--warn .stat__n { color: #d97706; }

.atable { width: 100%; border-collapse: collapse; background: var(--zap-surface);
  border: 1px solid var(--zap-border); border-radius: var(--zap-radius); overflow: hidden; }
.atable th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--zap-muted); padding: 11px 12px; border-bottom: 1px solid var(--zap-border); }
.atable td { padding: 11px 12px; border-bottom: 1px solid var(--zap-border); vertical-align: middle; font-size: 14px; }
.atable tbody tr:last-child td { border-bottom: 0; }
.atable tbody tr:hover { background: var(--zap-elevated); }
.atable .num { text-align: right; white-space: nowrap; }
.atable .warn { color: #d97706; font-weight: 700; }
.atable--plain { border: 0; } .atable--plain td { padding: 7px 0; }
.athumb { width: 38px; height: 38px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 19px; }
.alink { font-weight: 600; } .alink:hover { color: var(--zap-primary); }
.rowactions { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.btn--xs { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn--danger { color: #dc2626; border-color: #fca5a5; background: transparent; }
.btn--danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
.flash { background: #16a34a14; border: 1px solid #16a34a55; color: #15803d;
  border-radius: var(--zap-radius-sm); padding: 10px 14px; font-weight: 600; }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; text-transform: capitalize; }
.status--placed    { background: #f59e0b22; color: #b45309; }
.status--shipped   { background: #3b82f622; color: #1d4ed8; }
.status--delivered { background: #16a34a22; color: #15803d; }
.status--cancelled { background: #dc262622; color: #b91c1c; }

.aform label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 0; }
.aform input, .aform select, .aform textarea { width: 100%; font: inherit; font-weight: 400; margin-top: 5px;
  padding: 9px 11px; border: 1px solid var(--zap-border); border-radius: var(--zap-radius-sm);
  background: var(--zap-elevated); color: var(--zap-text); }
.aform input:focus, .aform select:focus, .aform textarea:focus { outline: none; border-color: var(--zap-primary); box-shadow: 0 0 0 3px var(--zap-primary-soft); }
.aform__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.aform__grid .span2 { grid-column: span 2; }
.aform__check { display: flex; align-items: center; gap: 8px; align-self: end; padding-bottom: 9px; }
.aform__check input { width: 17px; height: 17px; margin: 0; accent-color: var(--zap-primary); }
.aform__section { font-weight: 700; margin: 22px 0 10px; padding-top: 16px; border-top: 1px solid var(--zap-border); }
.aform__full { margin-bottom: 12px; }
.aform__note { font-size: 13px; margin: 8px 0 0; }
.aform__actions { display: flex; gap: 10px; margin-top: 22px; }
.colorpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.colorpick__opt { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13.5px;
  padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.colorpick__opt:hover { background: var(--zap-primary-soft); }
.colorpick__opt input { width: 15px; height: 15px; margin: 0; accent-color: var(--zap-primary); }
.admin-err { background: #dc262614; border: 1px solid #dc262655; color: #b91c1c;
  border-radius: var(--zap-radius-sm); padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.order-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; align-items: start; }
.order-delete { margin-top: 18px; border-top: 1px solid var(--zap-border); padding-top: 14px; text-align: right; }

/* zap-enhanced admin bits */
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.confirm-msg { margin: 0; }
.zapsel-host { margin-top: 5px; }
.zapsel-host .zap-sel { min-width: 0; }
.disc-prev { color: #16a34a; font-weight: 700; font-size: 12.5px; }
.admin__navfoot .theme-bar { flex-direction: column; align-items: stretch; gap: 8px; margin-bottom: 6px; }
.admin__navfoot .theme-bar .zap-sel { min-width: 0; }

/* featured star toggle + filter chips in products list */
.starbtn { background: none; border: 0; cursor: pointer; font-size: 20px; line-height: 1; padding: 2px 4px;
  color: var(--zap-border); transition: color .12s, transform .1s; }
.starbtn:hover { color: #f59e0b; transform: scale(1.15); }
.starbtn.is-on { color: #f59e0b; }
.admin__actions .chip { padding: 7px 13px; font-size: 13.5px; }
.admin__actions .chip--on { background: var(--zap-primary); border-color: var(--zap-primary); color: var(--zap-primary-contrast); }

/* categories admin */
.deptcard { margin-bottom: 16px; padding: 16px 18px; }
.deptcard__head { display: flex; align-items: center; gap: 12px; }
.deptcard__title { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.deptcard .facet > summary { font-size: 14px; padding: 10px 0; }
.catform { display: flex; gap: 8px; align-items: center; padding-bottom: 10px; flex-wrap: wrap; }
.catform input { width: auto; flex: 1; min-width: 140px; margin: 0; }
.catform__emoji { max-width: 70px; flex: 0 1 70px !important; }
.catform__grad { flex: 2 !important; }
.catstbl { margin: 8px 0; }
.catstbl th { padding: 8px 8px 8px 0; }
.catstbl td { padding: 9px 8px 9px 0; }
.catstbl__types { max-width: 320px; }
.rowmenu { position: relative; display: inline-block; }
.rowmenu > summary { list-style: none; display: inline-flex; cursor: pointer; }
.rowmenu > summary::-webkit-details-marker { display: none; }
.rowmenu[open] > .rowmenu__form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
  background: var(--zap-surface); border: 1px solid var(--zap-border); border-radius: var(--zap-radius-sm);
  box-shadow: var(--zap-shadow); padding: 14px; width: 320px; }
.rowmenu__form label { margin-bottom: 10px; }
.rowmenu__form textarea, .rowmenu__form input, .rowmenu__form select { font-size: 13.5px; }

.admin-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.admin-login__card { width: 360px; display: flex; flex-direction: column; gap: 14px; }
.admin-login__card h1 { font-size: 22px; text-align: center; }
.admin-login__card label { font-weight: 600; font-size: 14px; }
.admin-login__card input { width: 100%; font: inherit; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--zap-border); border-radius: var(--zap-radius-sm); background: var(--zap-elevated); color: var(--zap-text); }
.admin-login__hint { text-align: center; font-size: 12.5px; margin: 0; }

@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .admin__nav { position: static; height: auto; flex-direction: row; align-items: center; }
  .admin__nav nav { flex-direction: row; }
  .admin__navfoot { margin: 0 0 0 auto; flex-direction: row; }
  .aform__grid { grid-template-columns: 1fr; } .aform__grid .span2 { grid-column: auto; }
  .order-grid { grid-template-columns: 1fr; }
}

/* ── responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; } .hero__art { display: none; }
  .pdp { grid-template-columns: 1fr; }
  .cartwrap, .checkout { grid-template-columns: 1fr; }
  .results { grid-template-columns: 1fr; }
  .facets { position: static; }
  .summary { position: static; }
  .nav__inner { flex-wrap: wrap; } .search { order: 3; flex-basis: 100%; max-width: none; }
  .catstrip { overflow-x: auto; flex-wrap: nowrap; }
}
