/* ==========================================================================
   GAMEFOWL TPS: design system
   Gray and blue, sampled from the badge, with its lime as the accent.
   Retune the whole site by editing the variables in :root.
   ========================================================================== */

:root {
  /* Neutrals */
  --ink:        #111820;
  --slate-900:  #1A242F;
  --slate-800:  #24313E;
  --slate-700:  #33455A;
  --slate-600:  #47596C;
  --slate-500:  #5F7183;
  --slate-400:  #8496A6;
  --slate-300:  #B8C4CE;
  --slate-200:  #D9E1E8;
  --slate-100:  #EDF1F5;
  --paper:      #F7F9FB;
  --white:      #FFFFFF;

  /* Blue: sampled from the badge ring. Primary action colour. */
  --blue:        #0F6FC4;
  --blue-bright: #2A93E8;
  --blue-deep:   #0A4E8C;
  --blue-tint:   #E7F2FC;

  /* Lime: the "TPS" in the badge. Accent only, and never as text on white:
     it has almost no contrast there. Use it as a fill behind dark text. */
  --lime:      #E7E903;
  --lime-deep: #8A8C02;
  --lime-tint: #FAFBD2;

  /* Kept for destructive actions only, not as a brand colour */
  --red:       #C0261C;
  --red-deep:  #97180F;
  --red-tint:  #FDECEA;

  /* Status */
  --ok:        #21804F;
  --ok-tint:   #E7F5EE;
  --warn:      #B4700C;
  --warn-tint: #FDF3E2;
  --crit:      #C0261C;
  --crit-tint: #FDECEA;

  /* Type */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Shape */
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 32, .06), 0 1px 3px rgba(17, 24, 32, .04);
  --shadow:    0 2px 6px rgba(17, 24, 32, .07), 0 8px 22px rgba(17, 24, 32, .07);
  --shadow-lg: 0 8px 28px rgba(17, 24, 32, .12), 0 24px 60px rgba(17, 24, 32, .12);
  --ring: 0 0 0 3px rgba(42, 109, 176, .28);

  --header-h: 74px;
  --wrap: 1240px;
}

/* ---------------- reset ---------------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--slate-800);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-deep); }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; color: var(--ink); font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.18rem; letter-spacing: -.01em; }
p  { margin: 0 0 1em; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }

/* ---------------- page backgrounds ---------------- */

/*
   Each customer-facing page carries its own photograph. The image sits behind
   a heavy wash of the page colour so body text stays fully readable; the photo
   reads as atmosphere rather than decoration competing with the content.
   Set --page-bg on the body tag of each page.
*/
body.page-bg {
  /* A light wash only. The photograph should be plainly visible; readability
     comes from the solid cards sitting on top of it, not from hiding it. */
  background-image:
    linear-gradient(rgba(255, 255, 255, .34), rgba(247, 249, 251, .46)),
    var(--page-bg);
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* iOS treats fixed attachment badly, and phones should not pull the large file */
@media (max-width: 820px) {
  body.page-bg {
    background-attachment: scroll;
    background-image:
      linear-gradient(rgba(255, 255, 255, .40), rgba(247, 249, 251, .52)),
      var(--page-bg-sm, var(--page-bg));
  }
}

/* Content surfaces go fully opaque so every price and paragraph stays crisp
   against the photograph behind them. */
body.page-bg .panel,
body.page-bg .card,
body.page-bg .card-panel,
body.page-bg .tbl-wrap {
  background: #fff;
  box-shadow: 0 1px 3px rgba(17, 24, 32, .10), 0 14px 40px rgba(17, 24, 32, .16);
}
body.page-bg .card:hover {
  box-shadow: 0 2px 8px rgba(17, 24, 32, .13), 0 24px 56px rgba(17, 24, 32, .22);
}

/* the sidebar sits directly on the photo, so give it its own solid surface */
body.page-bg .filters .filter-list button {
  background: #fff;
  box-shadow: 0 1px 3px rgba(17, 24, 32, .10);
}
body.page-bg .filters .filter-list button:hover { background: var(--slate-100); }
body.page-bg .filters .filter-list button[aria-pressed="true"] { background: var(--blue-tint); }
body.page-bg .deposit-note {
  background: #fff;
  box-shadow: 0 1px 3px rgba(17, 24, 32, .10);
}

/*
   Text that sits directly on the photograph gets a solid panel behind it.
   `display: inline` with `box-decoration-break: clone` makes the fill hug the
   words on every wrapped line rather than painting a full-width block, so the
   photograph still shows through around the text.
*/
body.page-bg main > .eyebrow,
body.page-bg main > h1,
body.page-bg main > h2,
body.page-bg main > p,
body.page-bg .section-head h2,
body.page-bg .section-head .result-count {
  display: inline;
  background: #fff;
  box-shadow: 0 1px 3px rgba(17, 24, 32, .12);
  border-radius: var(--r-sm);
  padding: .18em .5em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  line-height: 1.55;
}

/* an inline element cannot carry its own vertical spacing, so the wrappers do */
body.page-bg main > .eyebrow,
body.page-bg main > h1,
body.page-bg main > h2,
body.page-bg main > p { margin-bottom: 0; }

body.page-bg main > .eyebrow + h1,
body.page-bg main > h1 + p,
body.page-bg main > p + .panel,
body.page-bg main > h1 { display: inline-block; margin-top: 10px; }

body.page-bg .section-head > div > * + * { margin-top: 8px; }
body.page-bg .section-head h2,
body.page-bg .section-head .result-count { display: inline-block; }

/* the sidebar headings and the deposit note get the same treatment */
body.page-bg .filters h3 {
  display: inline-block;
  background: #fff;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  box-shadow: 0 1px 3px rgba(17, 24, 32, .12);
}

/*
   Utility: put this on any run of text that sits directly on a photograph and
   it gets a solid panel hugging the words. Use it on a span inside the heading
   or paragraph, so the element keeps its block layout while only the text
   itself carries the fill.
*/
.on-photo {
  background: #fff;
  box-shadow: 0 1px 3px rgba(17, 24, 32, .12);
  border-radius: var(--r-sm);
  padding: .18em .5em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  line-height: 1.6;
}

/* the confirmation page centres its text, so the panels centre with it */
body.page-bg .confirm-hero h1,
body.page-bg .confirm-hero > p { line-height: 1.7; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.eyebrow {
  font-size: .72rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--blue);
}

/* ---------------- header ---------------- */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(26, 36, 47, .97);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.header-bar {
  height: var(--header-h);
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { width: 50px; height: 50px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-size: 1.02rem; font-weight: 900; letter-spacing: .05em;
  text-transform: uppercase; color: #fff;
}
/* the "TPS" half of the wordmark, in the badge lime */
.brand-name em { font-style: normal; color: var(--lime); }
.brand-sub {
  font-size: .62rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--slate-400); font-weight: 700;
}

.header-search { flex: 1; max-width: 460px; position: relative; }
.header-search input {
  width: 100%; height: 42px; padding: 0 14px 0 40px;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px; color: #fff;
}
.header-search input::placeholder { color: var(--slate-400); }
.header-search input:focus {
  background: rgba(255, 255, 255, .14);
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 3px rgba(62, 143, 214, .25);
}
.header-search svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--slate-400); pointer-events: none;
}

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.header-link {
  color: var(--slate-300); font-size: .88rem; font-weight: 600;
  padding: 8px 10px; border-radius: var(--r-sm);
}
.header-link:hover { color: #fff; background: rgba(255, 255, 255, .08); }

.cart-button {
  position: relative; display: flex; align-items: center; gap: 9px;
  height: 42px; padding: 0 17px;
  background: var(--blue); color: #fff; border: 0;
  border-radius: 999px; font-weight: 700; font-size: .9rem; cursor: pointer;
  transition: background .15s;
}
.cart-button:hover { background: var(--blue-bright); }
.cart-count {
  min-width: 21px; height: 21px; padding: 0 6px;
  /* lime fill with dark text, the accent has too little contrast to be
     legible as light text, but it is excellent as a background */
  background: var(--lime); color: var(--slate-900);
  border-radius: 999px;
  font-size: .74rem; font-weight: 800;
  display: grid; place-items: center;
}
.cart-count[hidden] { display: none; }

/* live inventory pulse */
.live-dot {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .7rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--slate-400);
}
.live-dot::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #35C377; box-shadow: 0 0 0 0 rgba(53, 195, 119, .6);
  animation: pulse 2.4s infinite;
}
.live-dot.off::before { background: var(--slate-500); animation: none; box-shadow: none; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(53, 195, 119, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(53, 195, 119, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 195, 119, 0); }
}

/* ---------------- hero ---------------- */

.hero {
  position: relative; min-height: 520px;
  display: flex; align-items: flex-end;
  background: var(--slate-900) center/cover no-repeat;
  color: #fff; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 32, .34) 0%, rgba(17, 24, 32, .12) 38%, rgba(17, 24, 32, .90) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 68px 0 54px; }
.hero h1 { color: #fff; max-width: 15ch; text-shadow: 0 2px 24px rgba(0, 0, 0, .45); }
.hero h1 span { color: var(--blue-bright); }
.hero p {
  max-width: 54ch; color: rgba(255, 255, 255, .86);
  font-size: 1.06rem; margin-top: 16px;
}
.hero-badge {
  position: absolute; right: 4%; top: 50%; transform: translateY(-50%);
  width: min(300px, 27vw); z-index: 2; opacity: .97;
  filter: drop-shadow(0 18px 44px rgba(0, 0, 0, .5));
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-strip {
  background: var(--slate-800); color: var(--slate-300);
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.hero-strip ul {
  display: flex; flex-wrap: wrap; gap: 8px 34px;
  margin: 0; padding: 15px 0; list-style: none;
  font-size: .84rem; font-weight: 600;
}
.hero-strip li { display: flex; align-items: center; gap: 9px; }
.hero-strip svg { width: 16px; height: 16px; color: var(--blue-bright); flex-shrink: 0; }

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; padding: 0 24px;
  border: 1px solid transparent; border-radius: var(--r);
  font-weight: 700; font-size: .94rem; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .06s;
  white-space: nowrap; text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--blue-bright); color: #fff; }

.btn-dark { background: var(--slate-800); color: #fff; }
.btn-dark:hover:not(:disabled) { background: var(--slate-700); color: #fff; }

.btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .28); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .18); color: #fff; }

.btn-outline { background: var(--white); color: var(--slate-800); border-color: var(--slate-200); }
.btn-outline:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }

.btn-danger { background: var(--white); color: var(--crit); border-color: #F0CFCB; }
.btn-danger:hover:not(:disabled) { background: var(--crit); color: #fff; border-color: var(--crit); }

.btn-sm { height: 36px; padding: 0 15px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-lg { height: 54px; padding: 0 32px; font-size: 1.02rem; }

/* ---------------- catalog ---------------- */

.shop-layout { display: grid; grid-template-columns: 224px 1fr; gap: 34px; align-items: start; }

.filters { position: sticky; top: calc(var(--header-h) + 20px); }
.filters h3 {
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--slate-500); margin-bottom: 12px;
}
.filter-list { list-style: none; margin: 0 0 26px; padding: 0; }
.filter-list button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 9px 12px; background: none; border: 0; border-radius: var(--r-sm);
  color: var(--slate-600); font-weight: 600; font-size: .92rem;
  cursor: pointer; text-align: left;
}
.filter-list button:hover { background: var(--slate-100); color: var(--ink); }
.filter-list button[aria-pressed="true"] { background: var(--blue-tint); color: var(--blue-deep); }
.filter-list .n {
  font-size: .76rem; font-weight: 700; color: var(--slate-400);
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: 999px; padding: 1px 8px;
}

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.result-count { color: var(--slate-500); font-size: .9rem; }

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

.card {
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.card:hover { border-color: var(--slate-300); box-shadow: var(--shadow); transform: translateY(-2px); }

.card-media {
  position: relative; aspect-ratio: 1 / 1;
  /* matches the product photography backdrop, so a slow-loading image
     never flashes a pale box against the dark tiles */
  background: #4A4744; overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-flags { position: absolute; top: 11px; left: 11px; display: flex; flex-direction: column; gap: 6px; }

.flag {
  font-size: .66rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; background: var(--white);
  border: 1px solid var(--slate-200); color: var(--slate-600);
  box-shadow: var(--shadow-sm);
}
.flag.pallet { background: var(--blue); color: #fff; border-color: var(--blue); }
.flag.limited { background: var(--warn-tint); color: var(--warn); border-color: #F2DDB4; }
.flag.last { background: var(--red-tint); color: var(--red-deep); border-color: #F6CFCE; }
.flag.out { background: var(--slate-700); color: #fff; border-color: var(--slate-700); }

.card-body { padding: 17px 18px 19px; display: flex; flex-direction: column; flex: 1; gap: 9px; }
.card-cat {
  font-size: .68rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--slate-400);
}
.card h3 { font-size: 1.04rem; }
.card-desc { font-size: .89rem; color: var(--slate-500); margin: 0; flex: 1; }

.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: 3px; }
.price { font-size: 1.42rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.price-unit { font-size: .82rem; color: var(--slate-400); font-weight: 600; }
.pallet-note {
  font-size: .8rem; color: var(--blue-deep); background: var(--blue-tint);
  border-radius: var(--r-sm); padding: 7px 10px; font-weight: 600;
}

.stock-line {
  display: flex; align-items: center; gap: 7px;
  font-size: .82rem; font-weight: 700;
}
.stock-line .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.stock-in       { color: var(--ok); }   .stock-in .dot      { background: var(--ok); }
.stock-limited  { color: var(--warn); } .stock-limited .dot { background: var(--warn); }
.stock-last     { color: var(--red-deep); } .stock-last .dot{ background: var(--red); }
.stock-out      { color: var(--slate-400); } .stock-out .dot{ background: var(--slate-400); }

.qty-row { display: flex; gap: 9px; align-items: stretch; margin-top: 4px; }
.qty {
  display: flex; align-items: center;
  border: 1px solid var(--slate-200); border-radius: var(--r); overflow: hidden;
  background: var(--white); flex-shrink: 0;
}
.qty button {
  width: 34px; height: 44px; border: 0; background: none;
  color: var(--slate-500); font-size: 1.15rem; cursor: pointer;
}
.qty button:hover:not(:disabled) { background: var(--slate-100); color: var(--ink); }
.qty button:disabled { opacity: .35; cursor: not-allowed; }
.qty input {
  width: 52px; height: 44px; border: 0; text-align: center;
  font-weight: 700; background: none; -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.qty-row .btn { flex: 1; height: 44px; }

/* ---------------- cart drawer ---------------- */

.drawer-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(17, 24, 32, .5); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 91;
  width: min(430px, 100vw); background: var(--white);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .24s cubic-bezier(.4, 0, .2, 1);
  box-shadow: var(--shadow-lg);
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 19px 22px; border-bottom: 1px solid var(--slate-200);
}
.drawer-head h2 { font-size: 1.16rem; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: none; border: 0; border-radius: var(--r-sm);
  color: var(--slate-500); cursor: pointer;
}
.icon-btn:hover { background: var(--slate-100); color: var(--ink); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 22px; }
.drawer-foot { border-top: 1px solid var(--slate-200); padding: 19px 22px; background: var(--paper); }

.cart-line { display: flex; gap: 13px; padding: 15px 0; border-bottom: 1px solid var(--slate-100); }
.cart-line:last-child { border-bottom: 0; }
.cart-line img {
  width: 62px; height: 62px; border-radius: var(--r-sm);
  object-fit: cover; background: #4A4744; flex-shrink: 0;
}
.cart-line-main { flex: 1; min-width: 0; }
.cart-line h4 { margin: 0 0 3px; font-size: .93rem; font-weight: 700; color: var(--ink); }
.cart-line .meta { font-size: .78rem; color: var(--slate-400); }
.cart-line-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 10px; }
.mini-qty { display: flex; align-items: center; border: 1px solid var(--slate-200); border-radius: var(--r-sm); }
.mini-qty button { width: 27px; height: 27px; border: 0; background: none; cursor: pointer; color: var(--slate-500); }
.mini-qty button:hover { background: var(--slate-100); }
.mini-qty span { min-width: 30px; text-align: center; font-size: .84rem; font-weight: 700; }
.line-total { font-weight: 800; font-size: .95rem; }
.link-remove { background: none; border: 0; color: var(--slate-400); font-size: .78rem; cursor: pointer; padding: 0; }
.link-remove:hover { color: var(--crit); text-decoration: underline; }

.totals { font-size: .92rem; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .deposit { color: var(--ok); font-weight: 600; }
.totals .grand {
  border-top: 2px solid var(--ink); margin-top: 9px; padding-top: 11px;
  font-size: 1.1rem; font-weight: 800; color: var(--ink);
}
.deposit-note {
  background: var(--blue-tint); border-radius: var(--r-sm);
  padding: 11px 13px; font-size: .82rem; color: var(--blue-deep);
  margin-bottom: 14px; line-height: 1.5;
}

.empty {
  text-align: center; padding: 60px 20px; color: var(--slate-400);
}
.empty svg { width: 46px; height: 46px; margin: 0 auto 14px; opacity: .45; }

/* ---------------- forms ---------------- */

.field { margin-bottom: 17px; }
.field label {
  display: block; font-size: .84rem; font-weight: 700;
  color: var(--slate-700); margin-bottom: 6px;
}
.field .hint { font-weight: 500; color: var(--slate-400); font-size: .78rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 11px 13px;
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: var(--r); transition: border-color .14s, box-shadow .14s;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue); box-shadow: var(--ring); outline: none;
}
.field input[aria-invalid="true"] { border-color: var(--crit); }
.field-error { color: var(--crit); font-size: .8rem; margin-top: 5px; font-weight: 600; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.panel {
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: var(--r-lg); padding: 26px;
}
.panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 1.22rem; margin-bottom: 5px; }
.panel .panel-sub { color: var(--slate-500); font-size: .9rem; margin-bottom: 20px; }

/* payment method picker */
.pay-options { display: grid; gap: 11px; }
.pay-option {
  display: flex; align-items: center; gap: 13px;
  padding: 15px 17px; border: 2px solid var(--slate-200);
  border-radius: var(--r); cursor: pointer; background: var(--white);
  transition: border-color .14s, background .14s;
}
.pay-option:hover { border-color: var(--slate-300); }
.pay-option input { accent-color: var(--blue); width: 18px; height: 18px; flex-shrink: 0; }
.pay-option.selected { border-color: var(--blue); background: var(--blue-tint); }
.pay-option-main { flex: 1; }
.pay-option strong { display: block; font-size: .96rem; color: var(--ink); }
.pay-option span { font-size: .82rem; color: var(--slate-500); }

.alert {
  padding: 13px 16px; border-radius: var(--r);
  font-size: .89rem; font-weight: 600; margin-bottom: 18px;
  border: 1px solid transparent; line-height: 1.5;
}
.alert-error { background: var(--crit-tint); color: var(--crit); border-color: #F2CDC9; }
.alert-ok    { background: var(--ok-tint);   color: var(--ok);   border-color: #C4E6D4; }
.alert-info  { background: var(--blue-tint); color: var(--blue-deep); border-color: #C9E0F4; }
.alert-warn  { background: var(--warn-tint); color: var(--warn); border-color: #F0DDB6; }

/* ---------------- order confirmation ---------------- */

.confirm-hero { text-align: center; padding: 52px 20px 34px; }
.confirm-check {
  width: 68px; height: 68px; margin: 0 auto 20px;
  border-radius: 50%; background: var(--ok-tint); color: var(--ok);
  display: grid; place-items: center;
}
.confirm-check svg { width: 34px; height: 34px; }
.order-number {
  font-family: var(--mono); font-size: 1.28rem; font-weight: 700;
  color: var(--ink); background: var(--slate-100);
  border-radius: var(--r); padding: 9px 17px; display: inline-block; margin-top: 13px;
  letter-spacing: .04em;
}

table.lines { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.lines th {
  text-align: left; font-size: .68rem; letter-spacing: .11em;
  text-transform: uppercase; color: var(--slate-400);
  padding: 0 10px 10px; font-weight: 800; border-bottom: 1px solid var(--slate-200);
}
table.lines td { padding: 13px 10px; border-bottom: 1px solid var(--slate-100); vertical-align: top; }
table.lines .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.lines tfoot td { border-bottom: 0; padding: 6px 10px; }
table.lines tfoot tr.grand td {
  border-top: 2px solid var(--ink); padding-top: 13px;
  font-size: 1.14rem; font-weight: 800; color: var(--ink);
}
.balance-value { color: var(--blue-deep); }

/* ---------------- footer ---------------- */

.site-footer {
  background: var(--slate-900); color: var(--slate-400);
  margin-top: 68px; padding: 46px 0 30px; font-size: .89rem;
}
.footer-grid {
  display: grid; gap: 32px;
  grid-template-columns: 1.6fr 1fr 1fr; margin-bottom: 32px;
}
.site-footer h4 {
  color: #fff; font-size: .74rem; letter-spacing: .14em;
  text-transform: uppercase; margin-bottom: 13px;
}
.site-footer a { color: var(--slate-400); display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; gap: 15px; align-items: flex-start; }
.footer-brand img { width: 66px; height: 66px; flex-shrink: 0; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .09); padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: .82rem; color: var(--slate-500);
}
.legal-note {
  background: rgba(255, 255, 255, .04); border-left: 3px solid var(--blue);
  padding: 13px 16px; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: .82rem; line-height: 1.6; color: var(--slate-400); margin-top: 22px;
}

/* ---------------- toast ---------------- */

.toast-stack {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 120; display: flex; flex-direction: column; gap: 9px;
  align-items: center; pointer-events: none; width: min(440px, calc(100vw - 32px));
}
.toast {
  background: var(--slate-900); color: #fff;
  padding: 12px 19px; border-radius: 999px;
  font-size: .89rem; font-weight: 600; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  animation: toast-in .25s cubic-bezier(.2, 1.2, .4, 1);
}
.toast.err { background: var(--crit); }
.toast.ok  { background: var(--ok); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }

/* stock number flashes when it changes live */
@keyframes flash {
  0%   { background: rgba(62, 143, 214, .30); }
  100% { background: transparent; }
}
.flash { animation: flash 1.1s ease-out; border-radius: 4px; }

.skeleton {
  background: linear-gradient(90deg, var(--slate-100) 25%, var(--slate-200) 37%, var(--slate-100) 63%);
  background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: var(--r-lg);
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------- responsive ---------------- */

@media (max-width: 980px) {
  .shop-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .filter-list { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
  .filter-list li { flex: 0 0 auto; }
  .filter-list button {
    width: auto; border: 1px solid var(--slate-200);
    background: var(--white); padding: 7px 14px;
  }
  .hero-badge { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .header-search { display: none; }
  .header-search.mobile-open {
    display: block; position: absolute; top: var(--header-h); left: 0; right: 0;
    padding: 12px 22px; background: var(--slate-900); max-width: none;
  }
  .brand-sub { display: none; }
  .hero { min-height: 430px; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-link.hide-sm { display: none; }
  .panel { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
