/* ─── Tokens ──────────────────────────────────────────────────────────────── */

:root {
  --bg: #0a0b0c;
  --surface: #101214;
  --surface-2: #171a1d;
  --line: #23272b;
  --line-soft: #1a1d20;
  --text: #eef1f2;
  --muted: #8a9199;
  --muted-2: #626a72;

  /* Two accents with separate jobs, so neither reads as decoration: ice is
     brand identity (logo, brand names, cart), green is action and
     availability (add to cart, selected size, in stock, live). */
  --ice: #a9e5f5;
  --ice-ink: #05161c;
  --ice-soft: rgba(169, 229, 245, 0.42);
  --ice-faint: rgba(169, 229, 245, 0.1);

  --accent: #4ade80;
  --accent-ink: #05130a;
  --accent-soft: rgba(74, 222, 128, 0.42);
  --accent-faint: rgba(74, 222, 128, 0.1);

  /* Neon: a resting halo on lit elements, a brighter one on hover. Works as
     both box-shadow and text-shadow, hence the bare "x y blur colour". */
  --ice-glow: 0 0 16px rgba(169, 229, 245, 0.45);
  --ice-glow-soft: 0 0 10px rgba(169, 229, 245, 0.28);
  --accent-glow: 0 0 16px rgba(74, 222, 128, 0.4);
  --accent-glow-soft: 0 0 10px rgba(74, 222, 128, 0.25);

  /* The outline around each product, in ice rather than the action green. */
  --card-line: rgba(169, 229, 245, 0.2);
  --card-line-hover: rgba(169, 229, 245, 0.55);

  --ok: #4ade80;
  --warn: #e0a94a;
  --bad: #e05a5a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/*
 * The HTML `hidden` attribute is only a `display: none` default, so any rule
 * below that sets an explicit display (.btn, .login-wrap, .slide-nav, …) would
 * otherwise beat it and leave the element on screen. Everything in this app is
 * shown/hidden via `.hidden`, so make the attribute authoritative.
 */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0 0 0.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

strong,
b {
  font-weight: 500;
}

h2 {
  font-size: 1.25rem;
}

h3 {
  font-size: 0.95rem;
  margin-top: 1.5rem;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* ─── Layout ──────────────────────────────────────────────────────────────── */

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 11, 12, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 1.35rem;
  line-height: 1.1;
}

.brand-tag {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ice);
  text-shadow: var(--ice-glow-soft);
  margin-top: 0.3rem;
}

@media (max-width: 560px) {
  .brand-name {
    font-size: 1.05rem;
  }
  .brand-tag {
    font-size: 0.5rem;
  }
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.link-quiet {
  color: var(--muted-2);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.link-quiet:hover {
  color: var(--text);
  border-bottom-color: var(--line);
}

/* Outlined in sand rather than filled — the filled treatment is reserved for
   the one action that matters on each card. */
.cart-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--ice-soft);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.cart-btn:hover {
  border-color: var(--ice);
  background: var(--ice-faint);
  box-shadow: var(--ice-glow);
}

.cart-btn .icon {
  width: 1.05rem;
  height: 1.05rem;
  color: var(--ice);
}

.cart-count {
  background: var(--ice);
  color: var(--ice-ink);
  box-shadow: var(--ice-glow-soft);
  border-radius: 100px;
  min-width: 1.5em;
  padding: 0.1em 0.4em;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ─── Trust bar ───────────────────────────────────────────────────────────── */

.trustbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
}

.trustbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.trust {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* Dividers between items rather than around them, so the row reads as one
   strip however many items are configured. */
.trust + .trust {
  border-left: 1px solid var(--line);
  padding-left: 1.5rem;
}

.trust .icon {
  width: 1rem;
  height: 1rem;
  color: var(--ice);
  filter: drop-shadow(var(--ice-glow-soft));
  flex: none;
}

/* The live-inventory dot — green, like everything that means "available". */
.trust .pulse {
  position: relative;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  box-shadow: 0 0 0 3px var(--accent-faint), var(--accent-glow);
}

@media (max-width: 720px) {
  .trustbar-inner {
    gap: 0.9rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .trustbar-inner::-webkit-scrollbar {
    display: none;
  }
  .trust + .trust {
    padding-left: 0.9rem;
  }
  .trust {
    font-size: 0.6rem;
  }
}

.foot {
  border-top: 1px solid var(--line-soft);
  padding: 1.5rem 1.25rem;
  display: flex;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  color: var(--muted-2);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ─── Shop heading ────────────────────────────────────────────────────────── */

.shop-head {
  margin-bottom: 1.5rem;
}

.shop-head h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.1;
}

.shop-sub {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0.4rem 0 0;
}

@media (max-width: 560px) {
  .shop-head h1 {
    font-size: 1.5rem;
  }
}

/* ─── Catalog tools: search + category filter ─────────────────────────────── */

.catalog-tools {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
  align-items: stretch;
}

.searchbox {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}

.searchbox .icon {
  position: absolute;
  left: 0.85rem;
  width: 1rem;
  height: 1rem;
  color: var(--ice);
  filter: drop-shadow(var(--ice-glow-soft));
  pointer-events: none;
}

.searchbox input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--ice-soft);
  border-radius: var(--radius-sm);
  padding: 0.65rem 2.2rem 0.65rem 2.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.searchbox input::placeholder {
  color: var(--muted-2);
}

.searchbox input:focus {
  border-color: var(--ice);
  box-shadow: var(--ice-glow);
}

.searchbox .clear {
  position: absolute;
  right: 0.6rem;
  background: none;
  border: 0;
  color: var(--muted-2);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 50%;
}

.searchbox .clear:hover {
  color: var(--text);
}

.filter-wrap {
  position: relative;
  flex: none;
}

/* Neon-blue button matching the search field. */
.filter-btn {
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--ice-soft);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.filter-btn:hover,
.filter-btn[aria-expanded="true"] {
  border-color: var(--ice);
  box-shadow: var(--ice-glow);
}

.filter-btn.active {
  border-color: var(--ice);
  background: var(--ice-faint);
}

.filter-btn .icon {
  width: 1rem;
  height: 1rem;
  color: var(--ice);
  filter: drop-shadow(var(--ice-glow-soft));
}

.filter-btn .filter-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ice);
  box-shadow: var(--ice-glow-soft);
}

.filter-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 30;
  min-width: 13rem;
  background: var(--surface);
  border: 1px solid var(--ice-soft);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow), var(--ice-glow-soft);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: none;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  padding: 0.5rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}

.filter-option:hover {
  background: var(--surface-2);
}

.filter-option[aria-checked="true"] {
  background: var(--ice);
  color: var(--ice-ink);
}

.filter-option .n {
  color: var(--muted-2);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.filter-option[aria-checked="true"] .n {
  color: var(--ice-ink);
  opacity: 0.6;
}

@media (max-width: 560px) {
  .catalog-tools {
    flex-wrap: wrap;
  }
  .searchbox {
    flex-basis: 100%;
  }
  .filter-btn {
    width: 100%;
    justify-content: center;
  }
  .filter-panel {
    left: 0;
    right: 0;
  }
}

/* ─── Brand filters ───────────────────────────────────────────────────────── */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

/* No text-transform — category names show with the exact casing you typed. */
.filter {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.filter:hover {
  border-color: var(--ice-soft);
}

.filter[aria-pressed="true"] {
  background: var(--ice);
  border-color: var(--ice);
  color: var(--ice-ink);
  box-shadow: var(--ice-glow);
}

.filter .n {
  color: var(--muted-2);
  font-weight: 500;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.filter[aria-pressed="true"] .n {
  color: var(--ice-ink);
  opacity: 0.55;
}

/* ─── Product grid ────────────────────────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

/* Phones: always two products side by side rather than one big card. The cards
   and everything in them shrink to suit, and size chips pick up a filled
   surface + hairline so they still read as tappable option boxes when small. */
@media (max-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem;
  }

  .card-body {
    padding: 0.7rem;
    gap: 0.35rem;
  }

  .card-brand {
    font-size: 0.68rem;
  }

  .card-name {
    font-size: 0.85rem;
  }

  .card-price {
    font-size: 0.85rem;
  }

  .card .size-picker {
    gap: 0.3rem;
  }

  .card .size-chip {
    min-width: 0;
    padding: 0.35rem 0.2rem;
    background: var(--surface-2);
    border-color: var(--line);
  }

  .card .size-chip .s-label {
    font-size: 0.75rem;
  }

  .card .size-chip .s-left {
    font-size: 0.54rem;
  }

  /* Selected chip keeps its green tint but drops the glow at this size, which
     would otherwise bleed past the tiny card. */
  .card .size-chip[aria-pressed="true"] {
    box-shadow: none;
  }

  .card .add {
    padding: 0.6rem 0.5rem;
    font-size: 0.76rem;
  }

  /* The cart icon crowds the label in a narrow button — the word alone is
     enough here. */
  .card .add .icon {
    display: none;
  }
}

/* One bordered container per product, photo flush to the top edge. */
.card {
  background: var(--surface);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.card:hover {
  border-color: var(--card-line-hover);
  box-shadow: var(--ice-glow-soft);
}

.card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

/* Sizes and the button sit at the bottom so cards in a row line up however
   many options each product carries. */
.card .size-picker {
  margin-top: auto;
  padding-top: 0.35rem;
}

.card .add {
  width: 100%;
  padding: 0.7rem 0.8rem;
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

a.card-media,
a.card-name {
  text-decoration: none;
  color: inherit;
  display: block;
}

a.card-name:hover {
  color: var(--accent);
}

.card-media {
  position: relative;
  aspect-ratio: 1;
  background: var(--surface-2);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-media img {
  transform: scale(1.04);
}

.card-media .noimg {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted-2);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge {
  position: absolute;
  color: var(--accent);
  text-shadow: var(--accent-glow-soft);
  font-weight: 500;
  top: 0.65rem;
  left: 0.65rem;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  padding: 0.28rem 0.55rem;
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.badge.out {
  color: var(--bad);
}

.badge.low {
  color: var(--warn);
}

.card-photos {
  position: absolute;
  bottom: 0.65rem;
  right: 0.65rem;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  padding: 0.22rem 0.5rem;
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text);
}

/* The brand, verbatim — no uppercasing, same as the filter chips. */
.card-brand {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ice);
}

.card-name {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  transition: color 0.15s;
}

.card-price {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.2rem;
}

.card.sold-out {
  border-color: var(--line);
}

.card.sold-out .card-media {
  opacity: 0.45;
}

.empty {
  color: var(--muted-2);
  text-align: center;
  padding: 4rem 1rem;
  font-size: 0.9rem;
}

/* ─── Size picker ─────────────────────────────────────────────────────────── */

.size-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Equal-width columns so a row of sizes reads as one control. */
.size-chip {
  flex: 1 1 0;
  min-width: 3.4rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.3rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.size-chip:hover:not(:disabled) {
  border-color: var(--accent-soft);
}

.size-chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-faint);
  box-shadow: var(--accent-glow-soft);
}

.size-chip .s-label {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.2;
}

/* The remaining count sits directly under each size. */
.size-chip .s-left {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  line-height: 1.3;
}

.size-chip[aria-pressed="true"] .s-left {
  color: var(--accent);
}

.size-chip:disabled,
.size-chip.out {
  opacity: 0.4;
  cursor: not-allowed;
}

.size-chip.out .s-left {
  color: var(--muted-2);
}

.size-picker.page .size-chip {
  flex: 0 0 auto;
  min-width: 3.8rem;
  padding: 0.5rem 0.6rem;
}

.size-picker.page .size-chip .s-label {
  font-size: 0.9rem;
}

.size-picker.page .size-chip .s-left {
  font-size: 0.62rem;
}

/* ─── Modals ──────────────────────────────────────────────────────────────── */

.modal {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 900px;
  width: calc(100% - 2rem);
  max-height: calc(100vh - 3rem);
  color: var(--text);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(3px);
}

.modal-body {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
}

@media (max-width: 720px) {
  .modal-body {
    padding: 1.25rem;
  }
}

/* ─── Slideshow ───────────────────────────────────────────────────────────── */

.slide-stage {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.slide-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 10, 11, 0.7);
  border: 1px solid var(--line);
  color: var(--text);
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  display: grid;
  place-items: center;
}

.slide-nav:hover {
  background: var(--surface-2);
}

.slide-nav.prev {
  left: 0.5rem;
}

.slide-nav.next {
  right: 0.5rem;
}

/* ─── Product info ────────────────────────────────────────────────────────── */

/* Carries the brand on the product page — verbatim and in sand, matching
   .card-brand on the grid. */
.eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ice);
  margin: 0 0 0.4rem;
}

.price {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0.35rem 0;
  font-variant-numeric: tabular-nums;
}

.stock {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 0.9rem;
}

.desc {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: pre-wrap;
  margin: 0 0 1.25rem;
}

/* ─── Forms ───────────────────────────────────────────────────────────────── */

.field {
  display: block;
  margin-bottom: 0.9rem;
}

.field > span {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 0.35rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.65rem;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--muted);
}

.field textarea {
  resize: vertical;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 0.75rem;
}

.field-grid .wide {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .field-grid {
    grid-template-columns: 1fr;
  }
}

input[type="file"] {
  width: 100%;
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
}

input[type="file"]::file-selector-button {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.3rem 0.6rem;
  margin-right: 0.6rem;
  cursor: pointer;
  font-size: 0.78rem;
}

.hint {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted-2);
  margin: 0 0 1rem;
}

.err {
  color: var(--bad);
  font-size: 0.8rem;
  font-weight: 500;
  margin: 0.75rem 0 0;
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: opacity 0.15s, background 0.15s;
}

.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  width: 100%;
  box-shadow: var(--accent-glow-soft);
}

.btn.primary:hover:not(:disabled) {
  background: #6ee79b;
  box-shadow: var(--accent-glow);
}

.btn .icon {
  width: 1rem;
  height: 1rem;
  flex: none;
}

.btn.ghost {
  background: none;
  border-color: var(--line);
  color: var(--text);
}

.btn.ghost:hover {
  border-color: var(--muted-2);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.btn-row .primary {
  flex: 1;
}

.btn.danger {
  background: rgba(224, 90, 90, 0.12);
  border-color: rgba(224, 90, 90, 0.35);
  color: var(--bad);
}

.btn.small {
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  width: auto;
}

/* ─── Cart ────────────────────────────────────────────────────────────────── */

.cart-line {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.cart-line img,
.cart-line .noimg {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface-2);
  flex: none;
}

.cart-line .meta {
  flex: 1;
  min-width: 0;
}

.cart-line .meta strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
}

/* The name links back to the product page — inherit the surrounding style
   rather than picking up the browser's default link colours. */
.cart-line .meta a {
  color: inherit;
  text-decoration: none;
}

.cart-line .meta a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cart-line .meta span {
  font-size: 0.72rem;
  color: var(--muted-2);
}

.cart-line input {
  width: 3.6rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.4rem;
  font-size: 0.8rem;
  text-align: center;
}

.cart-line .line-total {
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  min-width: 4.5rem;
  text-align: right;
}

.remove {
  background: none;
  border: 0;
  color: var(--muted-2);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 0.2rem;
}

.remove:hover {
  color: var(--bad);
}

.totals {
  margin: 1.25rem 0;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

.totals .row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.2rem 0;
  font-variant-numeric: tabular-nums;
}

.totals .row.total {
  color: var(--text);
  font-size: 1rem;
  border-top: 1px solid var(--line-soft);
  margin-top: 0.5rem;
  padding-top: 0.6rem;
}

/* ─── Checkout ────────────────────────────────────────────────────────────── */

.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 560px) {
  .choice-row {
    grid-template-columns: 1fr;
  }
}

.choice {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: border-color 0.15s, background 0.15s;
}

.choice:hover {
  border-color: var(--muted-2);
}

.choice[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--surface-2);
}

.choice strong {
  font-size: 0.85rem;
  font-weight: 600;
}

.choice span {
  font-size: 0.72rem;
  color: var(--muted-2);
}

.label-slot {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  margin-bottom: 0.6rem;
  background: var(--bg);
}

.label-slot .who {
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
}

.label-slot .who span {
  color: var(--muted-2);
}

/* ─── Payment details + copy ──────────────────────────────────────────────── */

.pay-details {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.pay-details h4 {
  margin: 0 0 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ─── Payment logos ───────────────────────────────────────────────────────── */

/* Logos are supplied by the store owner at any size or aspect ratio, so the
   box is fixed and the image is contained inside it rather than stretched. */
.pay-logo {
  flex: none;
  width: 2.4rem;
  height: 1.6rem;
  object-fit: contain;
  object-position: left center;
}

.pay-logo.small {
  width: 1.4rem;
  height: 1rem;
}

.pay-choice {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.pay-choice-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.pay-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.pay-row:last-child {
  border-bottom: 0;
}

.pay-row .k {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
  flex: none;
  min-width: 4.5rem;
}

.pay-row .v {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  flex: 1;
  word-break: break-all;
}

.pay-note {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.4rem 0;
}

.copy {
  flex: none;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.copy:hover {
  color: var(--text);
  border-color: var(--muted-2);
}

.copy svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.copy.copied {
  color: var(--ok);
  border-color: rgba(69, 196, 138, 0.4);
}

/* ─── Review + confirmation ───────────────────────────────────────────────── */

.review {
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.82rem;
}

.review dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
}

.review dt {
  color: var(--muted-2);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 0.15rem;
}

.review dd {
  margin: 0;
  white-space: pre-wrap;
}

.review hr {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 0.9rem 0;
}

.done {
  text-align: center;
  padding: 1rem 0;
}

.ordernum {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  margin: 0.5rem 0 1.25rem;
}

.ordernum code {
  font-family: var(--mono);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
}

.pending-note {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--warn);
  margin: 0 0 0.75rem;
}

.instructions {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  white-space: pre-wrap;
  margin: 0 auto 1.25rem;
  max-width: 34rem;
}

.done .btn {
  margin-top: 0.5rem;
}

/* ─── Product page ────────────────────────────────────────────────────────── */

.back-link {
  display: inline-block;
  color: var(--muted-2);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
}

.back-link:hover {
  color: var(--text);
}

.product-page {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 780px) {
  .product-page {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.product-page h1 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.product-page .price {
  font-size: 1.3rem;
}

/* The admin's note. Blank products render nothing at all. */
.product-note {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
  white-space: pre-wrap;
  border-left: 2px solid var(--line);
  padding-left: 0.8rem;
  margin: 0 0 1.5rem;
}

.slide-thumbs {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.thumb {
  width: 60px;
  height: 60px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  opacity: 0.5;
  transition: opacity 0.15s, border-color 0.15s;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb:hover {
  opacity: 0.85;
}

.thumb[aria-current="true"] {
  opacity: 1;
  border-color: var(--muted-2);
}

.product-info .btn {
  margin-bottom: 0.5rem;
}

/* ─── Checkout page ───────────────────────────────────────────────────────── */

.checkout-page {
  max-width: 760px;
}

.checkout-page h1 {
  font-size: 1.5rem;
  margin-bottom: 1.75rem;
}

.step {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.step h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.step-n {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 500;
}

.step .cart-line:first-of-type {
  padding-top: 0;
}

.proof-ok {
  color: var(--ok);
  font-size: 0.78rem;
  margin: 0.6rem 0 0;
}

/* Live list of what still has to happen before the order can be placed. */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.checklist li {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.3rem 0 0.3rem 1.4rem;
  position: relative;
}

.checklist li::before {
  content: "○";
  position: absolute;
  left: 0.2rem;
  color: var(--muted-2);
}

.checklist li.ok {
  color: var(--ok);
}

.checklist li.ok::before {
  content: "✓";
  color: var(--ok);
}

.btn.big {
  padding: 0.85rem 1.1rem;
  font-size: 0.95rem;
}

/* ─── Toast ───────────────────────────────────────────────────────────────── */

.toast {
  font-weight: 500;
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.55rem 1.1rem;
  font-size: 0.8rem;
  box-shadow: var(--shadow);
  z-index: 100;
}

/* ─── Admin ───────────────────────────────────────────────────────────────── */

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 22rem;
}

.login-card h1 {
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.tabs {
  display: flex;
  gap: 0.4rem;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 1.75rem;
}

.tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted-2);
  padding: 0.6rem 0.2rem;
  margin-right: 1rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.tab[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.tab .pip {
  background: var(--warn);
  color: var(--accent-ink);
  border-radius: 100px;
  padding: 0 0.4em;
  font-size: 0.65rem;
  margin-left: 0.35rem;
  font-weight: 500;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

/* ─── Search ──────────────────────────────────────────────────────────────── */

.search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 16rem;
  max-width: 26rem;
}

.search svg {
  position: absolute;
  left: 0.7rem;
  width: 0.9rem;
  height: 0.9rem;
  fill: none;
  stroke: var(--muted-2);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

.search input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.5rem 2.1rem 0.5rem 2.1rem;
  font-size: 0.82rem;
  font-weight: 500;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.search input::placeholder {
  color: var(--muted-2);
  font-weight: 500;
}

.search input:focus {
  border-color: var(--muted);
  background: var(--surface-2);
}

.search input:focus ~ svg {
  stroke: var(--text);
}

.search .clear {
  position: absolute;
  right: 0.5rem;
  background: none;
  border: 0;
  color: var(--muted-2);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0.2rem 0.3rem;
  border-radius: 50%;
}

.search .clear:hover {
  color: var(--text);
}

.search-count {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted-2);
  white-space: nowrap;
}

/* ─── Payment methods (admin) ─────────────────────────────────────────────── */

.pay-method {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0.9rem;
  margin-bottom: 0.75rem;
}

.pay-method-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.pay-method-head strong {
  font-size: 0.88rem;
}

.pay-method-body {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.pay-method-body textarea {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 500;
  resize: vertical;
  outline: none;
}

.pay-method-body textarea:focus {
  border-color: var(--muted);
}

.logo-slot {
  flex: none;
  width: 6rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.logo-preview {
  height: 3rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0.3rem;
}

.logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-preview .no-logo {
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--muted-2);
}

.logo-slot .btn {
  width: 100%;
  padding: 0.25rem;
  font-size: 0.68rem;
}

@media (max-width: 560px) {
  .pay-method-body {
    flex-direction: column;
  }
  .logo-slot {
    width: 100%;
    flex-direction: row;
    align-items: center;
  }
  .logo-preview {
    flex: 1;
  }
}

/* ─── Categories ──────────────────────────────────────────────────────────── */

.cat-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  background: var(--surface);
}

.cat-row input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 500;
  outline: none;
}

.cat-row input:focus {
  border-color: var(--muted);
}

.cat-row .count {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted-2);
  white-space: nowrap;
  min-width: 5rem;
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
  background: var(--surface);
}

.admin-row img,
.admin-row .noimg {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface-2);
  flex: none;
}

.admin-row .meta {
  flex: 1;
  min-width: 0;
}

.admin-row .meta strong {
  font-size: 0.88rem;
  font-weight: 500;
}

.admin-row .meta div {
  font-size: 0.72rem;
  color: var(--muted-2);
}

.pill {
  border-radius: 100px;
  padding: 0.15rem 0.55rem;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.pill.pending {
  color: var(--warn);
  border-color: rgba(224, 169, 74, 0.4);
}

.pill.approved {
  color: var(--ok);
  border-color: rgba(69, 196, 138, 0.4);
}

.pill.denied {
  color: var(--bad);
  border-color: rgba(224, 90, 90, 0.4);
}

.pill.hidden-pill {
  color: var(--muted-2);
}

.variant-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.variant-row input:first-child {
  flex: 1;
}

.variant-row input:nth-child(2) {
  width: 6rem;
}

.variant-row input {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.55rem;
  font-size: 0.85rem;
}

.photo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.photo-chip {
  position: relative;
  width: 84px;
}

.photo-chip img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.photo-chip .first {
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  background: rgba(10, 10, 11, 0.85);
  border-radius: 100px;
  font-size: 0.55rem;
  padding: 0.1rem 0.4rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.photo-tools {
  display: flex;
  gap: 0.2rem;
  margin-top: 0.25rem;
}

.photo-tools button {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  padding: 0.15rem;
  cursor: pointer;
  line-height: 1.4;
}

.photo-tools button:hover {
  color: var(--text);
}

.photo-tools button.del:hover {
  color: var(--bad);
}

.order-detail dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1rem;
  font-size: 0.82rem;
  margin: 0 0 1.25rem;
}

.order-detail dt {
  color: var(--muted-2);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 0.15rem;
}

.order-detail dd {
  margin: 0;
  white-space: pre-wrap;
}

.proof-img {
  max-height: 22rem;
  width: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.label-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  color: var(--text);
  text-decoration: none;
  margin: 0.2rem 0.3rem 0.2rem 0;
}

.label-link:hover {
  border-color: var(--muted-2);
}

/* ─── Inventory reorder mode ─────────────────────────────────────────────── */

.reorder-hint {
  margin: 0 0 0.75rem;
}

.reordering .admin-row {
  cursor: grab;
  user-select: none;
}

.reordering .admin-row:active {
  cursor: grabbing;
}

.reordering .admin-row.dragging {
  opacity: 0.45;
  border-color: var(--accent-soft);
  box-shadow: var(--accent-glow-soft);
}

.drag-handle {
  flex: none;
  color: var(--muted-2);
  font-size: 1.15rem;
  line-height: 1;
  cursor: grab;
}

/* ─── Editor tools (duplicate / delete) ──────────────────────────────────── */

.editor-tools {
  position: absolute;
  top: 0.75rem;
  right: 3.25rem;
  z-index: 2;
  display: flex;
  gap: 0.4rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--text);
}

.icon-btn.danger:hover {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.5);
}

/* ─── Bulk CSV import ────────────────────────────────────────────────────── */

.import-steps {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 1rem;
}

.import-steps li {
  color: var(--text);
}

.import-steps .hint {
  display: block;
  margin-top: 0.35rem;
}

.import-steps code {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 0.05rem 0.3rem;
  font-size: 0.85em;
}

.import-result {
  margin-top: 1rem;
  padding: 0.85rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.import-errors {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
  display: grid;
  gap: 0.25rem;
}

/* ─── Bulk selection toolbars ────────────────────────────────────────────── */

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.85rem;
  margin-bottom: 0.9rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.bulk-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

.bulk-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.bulk-actions .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.row-check {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  cursor: pointer;
  accent-color: var(--accent);
}

.danger-text:hover:not(:disabled) {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.5);
}

/* Packing view: what's in the box, at a glance. */
.order-items {
  color: var(--muted-2);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.order-row .meta {
  min-width: 0;
}

/* ─── Quick stock ────────────────────────────────────────────────────────── */

.stock-search {
  margin: 1rem 0 0.75rem;
  width: 100%;
}

.stock-rows {
  max-height: 45vh;
  overflow-y: auto;
  display: grid;
  gap: 0.4rem;
  padding-right: 0.25rem;
}

.stock-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.stock-row.changed {
  border-color: var(--accent-soft);
  box-shadow: var(--accent-glow-soft);
}

.stock-row .meta {
  flex: 1;
  min-width: 0;
}

.stock-row .meta strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-row .meta div {
  color: var(--muted-2);
  font-size: 0.85rem;
}

.stock-qty {
  flex: none;
  min-width: 5.5rem;
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.stock-qty .was {
  text-decoration: line-through;
  color: var(--muted-2);
}

.stock-qty .out {
  color: #ff6b6b;
}

.stock-foot {
  align-items: center;
}

.stock-foot .hint {
  margin-right: auto;
}
