/* Storefront shared base: tokens, fonts, buttons, header, footer. Used by the shop, order and
   account pages. Colors and fonts come from /brand/theme.css (brands/assets/<id>/theme.css);
   shop-only layout (hero, grid, product detail) lives in /css/shop.css. */

/* The Sergio Trendy file is a demo cut: only A-Z, a-z, 0-9, space, "." and "," are real glyphs;
   everything else renders as a black "kk" box. Split the family so those characters come from
   Montserrat ExtraBold instead, the same way clickcase.co does. Brands that don't use Sergio
   never request either file. */
@font-face { font-family: "Sergio Trendy"; src: url("/brand/fonts/sergio-trendy.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0020, U+002C, U+002E, U+0030-0039, U+0041-005A, U+0061-007A; }
@font-face { font-family: "Sergio Trendy"; src: url("/brand/fonts/montserrat-800.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0021-002B, U+002D, U+002F, U+003A-0040, U+005B-0060, U+007B-FFFF; }

:root {
  /* Derived from the brand tokens, so every brand gets the same playful outline-and-offset look. */
  --card-bg: var(--brand-card, #FFFFFF);
  --outline: 2px solid var(--brand-ink);
  --pop-sm: 2px 2px 0 var(--brand-ink);
  --pop: 3px 3px 0 var(--brand-ink);
  --pop-lg: 5px 5px 0 var(--brand-ink);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --edge: max(var(--gutter), calc((100% - var(--wrap)) / 2));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--brand-bg);
  color: var(--brand-ink);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand-secondary-strong, var(--brand-secondary)); outline-offset: 3px; border-radius: 6px; }
.display { font-family: var(--font-display); font-weight: 400; font-synthesis: none; letter-spacing: -0.01em; line-height: 1.02; margin: 0; text-wrap: balance; }
.muted { color: var(--brand-ink-soft); }
.small { font-size: 14px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--card-bg); border: var(--outline); border-radius: 999px; padding: 8px 16px; font-weight: 700; }
.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; }

/* ---------- header ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 68px;
  padding: 10px var(--edge);
  background: color-mix(in srgb, var(--brand-bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--brand-ink) 10%, transparent);
}
.logo { display: inline-flex; align-items: center; flex: none; border-radius: 8px; }
.logo img { height: 32px; width: auto; }
.bar-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav { display: flex; align-items: center; gap: 4px; margin-right: 6px; }
.nav a { font-size: 14px; font-weight: 700; text-decoration: none; padding: 10px 12px; border-radius: 999px; transition: color .15s ease; }
.nav a:hover { color: var(--brand-secondary-strong, var(--brand-secondary)); }
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  min-height: 44px;
  background: var(--brand-primary); color: var(--brand-primary-ink);
  border: var(--outline); border-radius: 999px; padding: 7px 10px 7px 14px;
  font-weight: 800; font-size: 15px;
  box-shadow: var(--pop-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cart-btn:hover { transform: translate(-1px, -1px); box-shadow: var(--pop); }
.cart-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.cart-btn svg { width: 18px; height: 18px; }
.count {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px;
  background: var(--brand-ink); color: var(--brand-bg);
  display: inline-grid; place-items: center; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.count.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.35); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px;
  border: var(--outline); border-radius: 999px; padding: 12px 26px;
  font-weight: 800; font-size: 16px; line-height: 1.2; text-decoration: none; text-align: center;
  box-shadow: var(--pop);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--brand-ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--brand-ink); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-dark { background: var(--brand-ink); color: var(--brand-bg); box-shadow: 3px 3px 0 var(--brand-primary); }
.btn-dark:hover { box-shadow: 4px 4px 0 var(--brand-primary); }
.btn-dark:active { box-shadow: 1px 1px 0 var(--brand-primary); }
.btn-primary { background: var(--brand-primary); color: var(--brand-primary-ink); }
.btn-primary:hover { background: var(--brand-primary-strong); }
.btn-secondary { background: var(--brand-secondary); color: var(--brand-ink); }
.btn-ghost { background: var(--card-bg); color: var(--brand-ink); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 8px 16px; font-size: 14px; box-shadow: var(--pop-sm); }
.btn-sm:hover { box-shadow: var(--pop); }

/* Media placeholders (cart thumbnails and cards without a photo). */
.media { position: relative; background: var(--brand-surface); }
.media.placeholder { display: grid; place-items: center; }
.media.placeholder.alt-0 { background: var(--brand-secondary); }
.media.placeholder.alt-1 { background: var(--brand-primary); }
.media.placeholder.alt-2 { background: var(--brand-highlight); }
.media.placeholder.alt-3 { background: var(--brand-success); }
.media.placeholder img { width: 38%; opacity: .95; }
.notice {
  display: flex; align-items: center; gap: 10px;
  background: var(--brand-highlight); border: var(--outline); border-radius: 16px; padding: 14px 18px; font-weight: 600; margin: 0 0 24px;
}

/* ---------- footer ---------- */
.foot { background: var(--brand-ink); color: var(--brand-bg); }
.foot-inner { padding: clamp(48px, 8vw, 64px) var(--edge) 28px; display: grid; gap: 40px; }
.foot-cols { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px 28px; }
.foot-brand img { height: 30px; width: auto; }
.foot .tag { font-family: var(--font-display); font-synthesis: none; font-size: clamp(26px, 3vw, 34px); margin: 18px 0 8px; line-height: 1.1; opacity: 1; }
.foot-brand p { max-width: 36ch; }
.foot h2 { font: 800 12px/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--brand-primary); margin: 0 0 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot ul a { font-size: 14px; font-weight: 600; text-decoration: none; opacity: .86; overflow-wrap: anywhere; }
.foot ul a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.foot p { margin: 6px 0; opacity: .8; font-size: 14px; }
.foot a { color: var(--brand-bg); }
.foot-bottom { border-top: 1px solid color-mix(in srgb, var(--brand-bg) 18%, transparent); padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: 13px; }
.foot-bottom p { margin: 0; }
.foot .right { text-align: right; }

/* ---------- cart drawer: see /css/cart.css ---------- */
.error { background: #FFE4DC; color: #8A2E17; border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 600; margin: 0; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 60;
  background: var(--brand-ink); color: var(--brand-bg); border-radius: 999px; padding: 12px 20px; font-weight: 700; font-size: 15px;
  transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- order page ---------- */
.order-wrap { max-width: 720px; margin: 0 auto; padding: 48px clamp(16px, 4vw, 32px) 80px; }
.order-top { background: var(--brand-surface); }
.order-hero { max-width: 720px; margin: 0 auto; padding: 48px clamp(16px, 4vw, 32px) 32px; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-secondary-strong); margin: 0 0 10px; }
.order-hero h1 { font-size: clamp(40px, 7vw, 64px); }
.order-hero .lede { font-size: 18px; margin: 14px 0 0; max-width: 40ch; }
.track { display: grid; grid-template-columns: repeat(4, 1fr); margin: 36px 0 8px; position: relative; }
.track::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 26px; height: 3px; background: var(--brand-line); border-radius: 3px; }
.track .fill { position: absolute; left: 12.5%; top: 26px; height: 3px; background: var(--brand-secondary); border-radius: 3px; transition: width .4s ease; }
.step { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; font-family: var(--font-display); font-size: 17px; font-weight: 400; color: var(--brand-ink-soft); }
.step .dot { width: 54px; height: 54px; border-radius: 999px; display: grid; place-items: center; background: var(--brand-bg); border: 3px solid var(--brand-line); }
.step .dot svg { width: 22px; height: 22px; }
.step.done { color: var(--brand-ink); }
.step.done .dot { background: var(--brand-secondary); border-color: var(--brand-secondary); color: var(--brand-bg); }
.step.now .dot { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--brand-primary-ink); box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand-primary) 30%, transparent); }
.status-pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 6px 12px; background: var(--brand-bg); font-weight: 700; font-size: 14px; margin-top: 18px; }
.pulse { width: 9px; height: 9px; border-radius: 99px; background: var(--brand-primary); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.panel { background: var(--brand-bg); border: 1px solid var(--brand-line); border-radius: 24px; padding: 8px 24px; margin-top: 20px; }
.panel h2 { font-family: var(--font-body); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-ink-soft); margin: 18px 0 4px; }
.items { width: 100%; border-collapse: collapse; }
.items td { padding: 14px 0; border-bottom: 1px solid var(--brand-line); vertical-align: top; }
.items tr:last-child td { border-bottom: 0; }
.items td:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.items .qty { color: var(--brand-ink-soft); font-weight: 600; margin-right: 6px; }
.items .sum td { padding: 8px 0; border: 0; color: var(--brand-ink-soft); }
.items .grand td { padding: 14px 0 18px; border-top: 1px solid var(--brand-line); font-size: 18px; font-weight: 800; color: var(--brand-ink); }
.help { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; background: var(--brand-highlight); border-radius: 20px; padding: 18px 20px; margin-top: 20px; font-size: 15px; }
.help img { width: 38px; }
.help p { margin: 0; }
.center { text-align: center; }

@media (max-width: 860px) {
  .foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav { display: none; }
}
@media (max-width: 720px) {
  .foot .right { text-align: left; }
  .cart-btn .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cart-btn { padding-left: 12px; }
  .step { font-size: 14px; }
  .step .dot { width: 44px; height: 44px; }
  .track::before, .track .fill { top: 21px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.note { margin: 0; }

/* ---------- live store bits (from ops settings) ---------- */
.announce { background: var(--brand-ink); color: #fff; text-align: center; font-size: 14px; font-weight: 600; padding: 9px 16px; }
.announce a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.ts-host { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 100; }
/* customer returns on the order page */
.return-box { display: grid; gap: 14px; }
.return-box .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.return-box select, .return-box textarea, .return-box input[type=number] { font: inherit; border: 1.5px solid var(--brand-line); border-radius: 12px; padding: 10px 12px; background: var(--brand-bg); color: var(--brand-ink); }
.return-box textarea { width: 100%; min-height: 80px; resize: vertical; }
.return-box label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.return-box .line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--brand-line); }
.return-box .line input { width: 72px; }
.req { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--brand-line); }
.req:last-child { border-bottom: 0; }
.form-err { color: #B3261E; font-weight: 600; font-size: 14px; }
.items-label { font-weight: 600; margin: 0 0 4px; }

/* ---------- accounts ---------- */
.acct-btn { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-ink); font-weight: 700; font-size: 15px; padding: 10px 14px; border-radius: 999px; margin-left: auto; margin-right: 8px; }
.acct-btn:hover { background: var(--brand-surface); }
.acct-btn svg { width: 20px; height: 20px; }
.heart { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 999px; border: 0; background: color-mix(in srgb, var(--brand-bg) 92%, transparent); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.1); transition: transform .15s; }
.heart:hover { transform: scale(1.08); }
.heart svg { width: 20px; height: 20px; fill: none; stroke: var(--brand-ink); stroke-width: 2; }
.heart[aria-pressed="true"] svg { fill: var(--brand-primary); stroke: var(--brand-primary-strong); }
.acct-wrap { max-width: 760px; margin: 0 auto; padding: 48px clamp(16px, 4vw, 32px) 80px; display: grid; gap: 20px; }
.acct-card { background: var(--brand-bg); border: 1.5px solid var(--brand-line); border-radius: 28px; padding: clamp(24px, 5vw, 44px); max-width: 480px; margin: 24px auto 0; width: 100%; display: grid; gap: 14px; }
.acct-card h1 { font-size: clamp(38px, 6vw, 52px); }
.acct-form { display: grid; gap: 12px; }
.acct-form label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.acct-form input { font: inherit; font-size: 17px; border: 1.5px solid var(--brand-line); border-radius: 14px; padding: 13px 16px; background: var(--brand-bg); color: var(--brand-ink); }
.acct-form input:focus { outline: none; border-color: var(--brand-secondary-strong); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-secondary) 35%, transparent); }
.acct-form .btn { justify-self: stretch; }
.acct-form.inline .btn { justify-self: start; }
.code-input { font-family: var(--font-body); font-size: 30px !important; letter-spacing: 14px; text-align: center; font-weight: 700; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-secondary-strong); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linklike:disabled { color: var(--brand-ink-soft); text-decoration: none; cursor: default; }
.linklike.danger { color: #B3261E; }
.row-gap { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.acct-head h1 { font-size: clamp(40px, 6vw, 60px); }
.acct-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.acct-tabs a { padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--brand-line); font-weight: 700; color: var(--brand-ink); }
.acct-tabs a.on { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.acct-orders { display: grid; gap: 12px; }
.acct-order { display: flex; justify-content: space-between; gap: 16px; padding: 18px 20px; border: 1.5px solid var(--brand-line); border-radius: 20px; color: var(--brand-ink); background: var(--brand-bg); transition: border-color .15s, transform .15s; }
.acct-order:hover { border-color: var(--brand-ink); transform: translateY(-1px); }
.acct-order .right { text-align: right; display: grid; gap: 6px; justify-items: end; align-content: start; }
.acct-items { color: var(--brand-ink-soft); margin-top: 4px; }
.acct-status { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--brand-surface); white-space: nowrap; }
.acct-status.s-paid, .acct-status.s-in_production { background: color-mix(in srgb, var(--brand-secondary) 35%, white); }
.acct-status.s-shipped { background: var(--brand-highlight); }
.acct-status.s-delivered { background: color-mix(in srgb, var(--brand-success) 60%, white); }
.acct-empty { text-align: center; padding: 40px 16px; display: grid; gap: 10px; justify-items: center; }
.acct-empty .display { font-size: 34px; }
.acct-wish { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.wish-card { border: 1.5px solid var(--brand-line); border-radius: 20px; overflow: hidden; background: var(--brand-bg); }
.wish-img { aspect-ratio: 1; background: var(--brand-surface); display: grid; place-items: center; }
.wish-img img { width: 100%; height: 100%; object-fit: cover; }
.wish-img img.mark { width: 40%; height: auto; object-fit: contain; }
.wish-body { padding: 14px 16px; display: grid; gap: 6px; }
.acct-sections { display: grid; gap: 14px; }
.acct-sections .panel h2 { margin-bottom: 10px; }
@media (max-width: 560px) {
  .acct-btn .label { display: none; }
  .acct-btn { padding: 10px; margin-right: 4px; }
  .acct-order { flex-direction: column; }
  .acct-order .right { justify-items: start; text-align: left; }
}
.acct-btn, .acct-tabs a, .acct-order, .acct-order * { text-decoration: none; }
