/* store.smashingsite.com
   Same look as smashingsite.com: Manrope, indigo on white, faint grid,
   chunky sticker-style badges. No inline styles anywhere - the site's
   Content-Security-Policy forbids them. */

:root {
  --ink: #0a0a0a;
  --ink-soft: #4a4a4a;
  --dim: #5c5c5c;
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-tint: #f3f2fd;
  --brand-line: #dddbf7;
  --yellow: #ffd84d;
  --green: #15803d;
  --green-tint: #e6f7ec;
  --red: #b42318;
  --red-tint: #fdecea;
  --amber-tint: #fff6d6;
  --line: #e8e8e8;
  --line-strong: #cfcfd4;
  --card: #ffffff;
  --radius: 18px;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background-color: #ffffff;
  background-image: linear-gradient(#f3f3f5 1px, transparent 1px), linear-gradient(90deg, #f3f3f5 1px, transparent 1px);
  background-size: 96px 96px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
main { flex-grow: 1; padding-bottom: 80px; }

/* ---- header ------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--line); background: #ffffff; position: sticky; top: 0; z-index: 40; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: flex; flex-direction: column; line-height: 1.05; }
.logo:hover { color: inherit; }
.logo .word { font-weight: 800; font-size: 24px; letter-spacing: -0.02em; }
.logo .word b { color: var(--brand); font-weight: 800; }
.logo .word i { font-style: normal; font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; background: var(--yellow); border-radius: 6px; padding: 3px 7px; margin-left: 6px; vertical-align: 4px; }
.logo .by { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); margin-top: 3px; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a { font-weight: 600; font-size: 16px; padding: 10px 12px; }
.site-nav a[aria-current='page'] { color: var(--brand); font-weight: 700; }
.basket-link { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 10px; background: #ffffff; margin-left: 6px; }
.basket-link svg { flex-shrink: 0; }
.basket-count { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--brand); color: #ffffff; font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.basket-count[data-empty='true'] { background: #e9e9ee; color: var(--dim); }

/* ---- buttons ------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 13px 22px; font-weight: 700; font-size: 16px; line-height: 1.2; cursor: pointer; background: var(--brand); color: #ffffff; transition: background 0.15s, transform 0.05s; }
.btn:hover { background: var(--brand-dark); color: #ffffff; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { background: #d8d8de; color: #6b6b75; cursor: not-allowed; }
.btn-dark { background: var(--ink); }
.btn-dark:hover { background: #2a2a2a; }
.btn-ghost { background: #ffffff; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: #f6f6f8; color: var(--ink); }
.btn-danger { background: #ffffff; color: var(--red); border-color: #f0c4bf; }
.btn-danger:hover { background: var(--red-tint); color: var(--red); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 8px; }
.link-btn { background: none; border: 0; padding: 4px 0; font-weight: 600; font-size: 14px; color: var(--dim); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--red); }

/* ---- quantity stepper --------------------------------------------------- */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 10px; background: #ffffff; overflow: hidden; }
.stepper button { width: 42px; height: 44px; border: 0; background: #ffffff; font-size: 20px; font-weight: 700; cursor: pointer; line-height: 1; }
.stepper button:hover:not([disabled]) { background: var(--brand-tint); color: var(--brand); }
.stepper button[disabled] { color: #c4c4cc; cursor: not-allowed; }
.stepper output { min-width: 36px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---- hero --------------------------------------------------------------- */
.hero { padding: 56px 0 36px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brand); }
.hero h1 { font-size: clamp(36px, 5.4vw, 62px); font-weight: 800; line-height: 1.05; letter-spacing: -0.035em; max-width: 14em; }
.hero h1 span { color: var(--brand); }
.hero p { font-size: 19px; color: var(--ink-soft); max-width: 34em; }
.stickers { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 18px; }
.stickers li { border: 5px solid #ffffff; box-shadow: 0 6px 18px rgba(20, 20, 60, 0.18); font-weight: 800; font-size: 15px; padding: 10px 18px; line-height: 1.2; }
.stickers li:nth-child(1) { background: var(--brand); color: #ffffff; border-radius: 16px; transform: rotate(-3deg); }
.stickers li:nth-child(2) { background: var(--ink); color: #ffffff; border-radius: 999px; transform: rotate(2deg); }
.stickers li:nth-child(3) { background: var(--yellow); color: var(--ink); border-radius: 16px; transform: rotate(-2deg); }

.banner { border-radius: 14px; padding: 14px 18px; font-weight: 600; margin-bottom: 20px; border: 1px solid; }
.banner-warn { background: var(--amber-tint); border-color: #f1dc8a; }
.banner-error { background: var(--red-tint); border-color: #f0c4bf; color: #7a1a12; }
.banner-ok { background: var(--green-tint); border-color: #b9e6c8; color: #0f5a2c; }
.banner ul { margin: 0; padding-left: 20px; }
.banner li + li { margin-top: 4px; }

/* ---- product grid ------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.product { background: var(--card); border: 1px solid #dcdce0; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.product-media { position: relative; aspect-ratio: 4 / 3; background: var(--brand-tint); display: flex; align-items: center; justify-content: center; }
.product-media img { width: 100%; height: 100%; object-fit: contain; }
.product-media .tag { position: absolute; top: 12px; left: 12px; }
.product.is-out .product-media img { opacity: 0.45; filter: grayscale(0.6); }
.product-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.product-body h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.product-body .desc { font-size: 15px; color: var(--ink-soft); }
.product-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.price { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.product-buy { margin-top: auto; padding-top: 8px; display: flex; flex-direction: column; gap: 10px; }
.product-buy .row { display: flex; gap: 10px; align-items: center; }
.product-buy .btn { flex-grow: 1; }
.in-basket { font-size: 14px; font-weight: 600; color: var(--green); }

.tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: #eeeef2; color: var(--ink-soft); }
.tag-green { background: var(--green-tint); color: #0f5a2c; }
.tag-amber { background: var(--yellow); color: var(--ink); }
.tag-red { background: var(--red-tint); color: var(--red); }
.tag-ink { background: var(--ink); color: #ffffff; }
.tag-brand { background: var(--brand-tint); color: var(--brand-dark); }

.empty { text-align: center; padding: 56px 24px; background: #ffffff; border: 1px dashed var(--line-strong); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.empty p { color: var(--ink-soft); }
.loading { text-align: center; color: var(--dim); padding: 48px 0; font-weight: 600; }

/* ---- the Tidy Troop ----------------------------------------------------- */
.troop { margin-top: 56px; background: var(--brand-tint); border: 1px solid var(--brand-line); border-radius: 28px; padding: 36px 24px 28px; text-align: center; }
.troop h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-top: 8px; }
.troop-row { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; }
.troop-row li { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.troop-row img { width: 120px; height: 160px; transition: transform 0.25s ease-out; }
.troop-row li:hover img { transform: translateY(-8px) rotate(-3deg); }
.troop-row li:nth-child(even):hover img { transform: translateY(-8px) rotate(3deg); }
.troop-row span { font-weight: 800; font-size: 16px; background: #ffffff; border: 1px solid var(--brand-line); border-radius: 999px; padding: 4px 14px; }
@media (max-width: 560px) { .troop-row { gap: 10px 14px; } .troop-row img { width: 84px; height: 112px; } }

/* ---- basket ------------------------------------------------------------- */
.page-head { padding: 40px 0 24px; }
.page-head h1 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.page-head p { color: var(--ink-soft); margin-top: 6px; }
.basket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.panel { background: #ffffff; border: 1px solid #dcdce0; border-radius: var(--radius); padding: 24px; }
.panel + .panel { margin-top: 22px; }
.panel h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }

.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); align-items: center; }
.line:first-child { border-top: 0; padding-top: 0; }
.line:last-child { padding-bottom: 0; }
.line-img { width: 84px; height: 84px; border-radius: 12px; background: var(--brand-tint); object-fit: contain; }
.line-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.line-name { font-weight: 800; font-size: 17px; line-height: 1.25; }
.line-sub { font-size: 14px; color: var(--dim); }
.line-text { font-size: 14px; font-weight: 600; color: var(--brand-dark); overflow-wrap: anywhere; }
.line-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 6px; }
.line-total { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

.summary { position: sticky; top: 92px; }
.totals { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 10px 0; font-size: 16px; }
.totals dt { color: var(--ink-soft); }
.totals dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.totals .grand { font-size: 22px; font-weight: 800; color: var(--ink); padding-top: 12px; border-top: 1px solid var(--line); }
.nudge { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--brand-dark); background: var(--brand-tint); border-radius: 10px; padding: 10px 12px; }
.fine { font-size: 13px; color: var(--dim); margin-top: 12px; }
.fine a { text-decoration: underline; text-underline-offset: 2px; }
.pay-wrap { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.turnstile { min-height: 65px; }

/* ---- forms -------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label, .label { font-size: 14px; font-weight: 700; }
.field .opt { font-weight: 500; color: var(--dim); }
.input, .field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 14px; background: #ffffff; font-size: 16px; }
.field input:focus, .field textarea:focus, .field select:focus, .input:focus { outline: 3px solid var(--brand-line); border-color: var(--brand); }
.field.has-error input { border-color: var(--red); }
.field .error { font-size: 13px; font-weight: 600; color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- order page --------------------------------------------------------- */
.order-card { max-width: 640px; margin: 48px auto 0; text-align: center; }
.order-card .big { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 800; background: var(--green-tint); color: var(--green); }
.order-card .big.wait { background: var(--brand-tint); color: var(--brand); }
.order-card .big.bad { background: var(--red-tint); color: var(--red); }
.order-card h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; }
.order-card .ref { display: inline-block; margin: 14px 0; font-weight: 800; font-size: 18px; letter-spacing: 0.06em; background: var(--yellow); border-radius: 10px; padding: 8px 14px; }
.order-card p { color: var(--ink-soft); }
.order-items { text-align: left; margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); }
.order-items .totals { margin-top: 12px; }
.order-card .actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.spinner { width: 34px; height: 34px; border: 4px solid var(--brand-line); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- footer ------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); background: #ffffff; }
.site-footer .wrap { padding-top: 24px; padding-bottom: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 14px; color: var(--dim); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer nav a { font-weight: 600; color: #2b2b2b; }

.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #ffffff; padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 200; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25); max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast a { color: #b9b5ff; text-decoration: underline; margin-left: 8px; }

/* ---- admin -------------------------------------------------------------- */
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 28px 0 18px; }
.admin-bar h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; margin-right: auto; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line-strong); margin-bottom: 22px; }
.tabs button { border: 0; background: none; padding: 12px 16px; font-weight: 700; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; color: var(--dim); }
.tabs button[aria-selected='true'] { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .count { margin-left: 6px; font-size: 12px; background: var(--brand); color: #ffffff; border-radius: 999px; padding: 2px 8px; }
.login { max-width: 400px; margin: 72px auto 0; }
.login h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 16px; }
.login form { display: flex; flex-direction: column; gap: 14px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.toolbar .spacer { flex-grow: 1; }
.toolbar select { border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; background: #ffffff; }
.prow { background: #ffffff; border: 1px solid #dcdce0; border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.prow.is-hidden { background: #fafafb; }
.prow-main { display: grid; grid-template-columns: 56px minmax(160px, 2fr) repeat(3, minmax(92px, 1fr)) auto auto; gap: 12px; align-items: end; }
.prow-main img, .thumb-empty { width: 56px; height: 56px; border-radius: 10px; background: var(--brand-tint); object-fit: contain; align-self: center; }
.prow .field label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dim); }
.prow .field input, .prow .field textarea { padding: 9px 11px; font-size: 15px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; padding-bottom: 10px; white-space: nowrap; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.prow-more { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 12px; }
.prow-more .wide { grid-column: 1 / -1; }
.prow-foot { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.prow-foot .status { font-size: 14px; font-weight: 600; color: var(--green); margin-right: auto; }
.prow-foot .status.bad { color: var(--red); }
.hint { font-size: 13px; color: var(--dim); }
.ocard { background: #ffffff; border: 1px solid #dcdce0; border-radius: 14px; padding: 18px; margin-bottom: 12px; }
.ocard.needs-attention { border-color: #f0c4bf; box-shadow: inset 4px 0 0 var(--red); }
.ocard-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ocard-head .ref { font-weight: 800; font-size: 18px; letter-spacing: 0.04em; }
.ocard-head .when { color: var(--dim); font-size: 14px; }
.ocard-head .total { margin-left: auto; font-weight: 800; font-size: 18px; }
.ocard-body { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; }
.ocard-body h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); margin-bottom: 6px; }
.ocard-body ul { margin: 0; padding: 0; list-style: none; }
.ocard-body address { font-style: normal; white-space: pre-line; }
.ocard-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ocard-actions input[type='text'] { border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 11px; font-size: 14px; min-width: 220px; }

/* ---- small screens ------------------------------------------------------ */
@media (max-width: 900px) {
  .basket-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .prow-main { grid-template-columns: 56px 1fr 1fr; }
  .prow-main .name-field { grid-column: 2 / -1; }
  .prow-more { grid-template-columns: 1fr; }
  .ocard-body { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .logo .by { display: none; }
  .site-nav a.hide-sm { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .line { grid-template-columns: 64px minmax(0, 1fr); }
  .line-img { width: 64px; height: 64px; }
  .line-total { grid-column: 2; text-align: left; }
  .panel { padding: 18px; }
  .hero { padding-top: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .spinner { animation-duration: 2.4s; }
}
