/* Generation Private Coaching - shop styles. Brand colours are set in catalogue/settings.json
   and applied at runtime as --ink / --paper / --accent. */
@font-face {
  font-family: "Cinzel";
  src: url("/fonts/cinzel-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
:root {
  --ink: #0d0d0f;
  --paper: #ffffff;
  --accent: #d4a52a;
  --gold-text: #8a6610;
  --muted: #5d6068;
  --line: #e4e4e7;
  --soft: #f4f4f5;
  --danger: #b42318;
  --ok: #067647;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* hidden always wins over layout rules */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.5; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand img { height: 32px; width: auto; }
.wordmark { display: flex; flex-direction: column; font-family: "Cinzel", "Trajan Pro", Georgia, serif; font-weight: 600; text-transform: uppercase; line-height: 1; }
.wordmark b { font-weight: 600; font-size: 19px; letter-spacing: .06em; }
.wordmark small { font-size: 10px; letter-spacing: .14em; margin-top: 4px; color: #d4d4d8; }
@media (max-width: 380px) { .brand img { height: 26px; } .wordmark b { font-size: 16px; } }
.basket-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; padding: 9px 14px; border-radius: 999px; background: #ffffff14; border: 1px solid #ffffff2e; white-space: nowrap; }
.basket-link:hover { background: #ffffff24; }
.basket-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--ink); font-size: 13px; display: inline-grid; place-items: center; }

/* category bar */
.cat-bar { position: sticky; top: 64px; z-index: 19; background: var(--ink); border-top: 1px solid #ffffff1f; }
.cat-scroll { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat { flex: none; border: 1px solid #ffffff40; background: transparent; color: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 14.5px; cursor: pointer; white-space: nowrap; }
.cat:hover { border-color: #fff; }
.cat[aria-selected="true"] { background: #fff; color: var(--ink); border-color: #fff; }
.cat:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* demo banner */
.demo-banner { background: repeating-linear-gradient(-45deg, #ffd60a, #ffd60a 14px, #ffe45c 14px, #ffe45c 28px); color: #1a1a1a; text-align: center; font-weight: 700; font-size: 14px; padding: 8px 16px; border-bottom: 2px solid #1a1a1a; }

/* banner photo */
.banner { background: var(--ink); }
.banner picture, .banner img { display: block; width: 100%; max-width: 1400px; margin: 0 auto; height: auto; }

/* hero */
.hero { background: var(--ink); color: #fff; padding: 18px 0 20px; border-top: 1px solid #ffffff1f; }
.hero .offer-chip { margin-top: 0; }
.batch-note { margin: 14px 0 0; color: #d4d4d8; font-size: 15px; max-width: 70ch; }
.batch-note b { color: #fff; display: block; margin-bottom: 2px; }
.hero h1 { font-family: "Cinzel", "Trajan Pro", Georgia, serif; font-weight: 600; letter-spacing: .04em; font-size: clamp(26px, 5vw, 42px); max-width: 22ch !important; line-height: 1.02; margin: 0 0 12px; text-transform: uppercase; letter-spacing: -.01em; font-weight: 900; max-width: 14ch; }
.hero p { color: #d4d4d8; margin: 0; max-width: 52ch; font-size: 17px; }
.offer-chip { display: inline-flex; gap: 8px; align-items: center; margin-top: 20px; background: var(--accent); color: var(--ink); font-weight: 800; padding: 8px 14px; border-radius: 999px; font-size: 15px; }

/* info strip */
.info-strip { border-bottom: 1px solid var(--line); background: var(--soft); }
.info-strip ul { list-style: none; margin: 0 auto; padding: 14px 16px; display: grid; gap: 8px 24px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); font-size: 14.5px; }
.info-strip li { display: flex; gap: 8px; align-items: flex-start; }
.info-strip b { display: block; }
.tick { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 900; margin-top: 2px; }

/* product grid */
.section-title { font-size: 22px; margin: 32px 0 16px; font-weight: 800; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 40px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: box-shadow .15s, transform .15s; text-align: left; padding: 0; }
.card:hover, .card:focus-visible { box-shadow: var(--shadow); transform: translateY(-2px); outline: none; }
.card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.card .img { aspect-ratio: 1; background: #fff; position: relative; }
.card .img img { width: 100%; height: 100%; object-fit: contain; }
.card .tag { position: absolute; top: 8px; left: 8px; background: var(--accent); color: var(--ink); font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; border-top: 1px solid var(--line); }
.card .name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.card .price { font-weight: 800; font-size: 17px; margin-top: auto; }
.card .cta { margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 14px 20px; font-weight: 800; font-size: 16px; cursor: pointer; text-decoration: none; background: var(--ink); color: #fff; min-height: 50px; }
.btn:hover { filter: brightness(1.15); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.accent { background: var(--accent); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn.block { width: 100%; }
.btn.small { padding: 8px 12px; min-height: 0; font-size: 14px; border-radius: 10px; }
.linkish { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; color: var(--muted); font-size: 14px; }

/* product dialog */
dialog.product { border: 0; padding: 0; border-radius: 18px; width: min(920px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
dialog.product::backdrop { background: rgba(10,10,12,.6); }
.pd { display: grid; grid-template-columns: 1fr; }
@media (min-width: 760px) { .pd { grid-template-columns: 1fr 1fr; } }
.pd .pd-img { background: #fff; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .pd .pd-img { border-bottom: 0; border-right: 1px solid var(--line); } }
.pd .pd-img img { width: 100%; aspect-ratio: 1; object-fit: contain; max-height: 46vh; }
@media (min-width: 760px) { .pd .pd-img img { max-height: none; } }
.pd .pd-body { padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.pd h2 { margin: 0; font-size: 22px; line-height: 1.2; padding-right: 36px; }
.pd .pd-price { font-size: 20px; font-weight: 800; }
.pd .pd-desc { color: var(--muted); margin: 0; font-size: 15px; }
.close-x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--soft); font-size: 22px; cursor: pointer; line-height: 1; z-index: 2; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend, .label { font-weight: 800; font-size: 15px; margin-bottom: 8px; padding: 0; display: block; }
.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.sizes label { position: relative; }
.sizes input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.sizes span { display: grid; place-items: center; height: 44px; border: 2px solid var(--line); border-radius: 10px; font-weight: 700; font-size: 14px; }
.sizes input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.sizes input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.size-note { font-size: 13px; color: var(--muted); margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 600; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.initials-box { display: grid; gap: 10px; margin-top: 12px; }
.input, select.input, textarea.input { width: 100%; border: 2px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 16px; background: #fff; }
.input:focus { border-color: var(--ink); outline: none; }
.input.initials { text-transform: uppercase; letter-spacing: .25em; font-weight: 800; font-size: 20px; max-width: 180px; }
.hint { font-size: 13px; color: var(--muted); }
.error { color: var(--danger); font-size: 14px; font-weight: 600; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.qty button { width: 44px; height: 44px; border: 0; background: var(--soft); font-size: 20px; font-weight: 700; cursor: pointer; }
.qty output, .qty span { min-width: 44px; text-align: center; font-weight: 800; }
.pd-foot { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 16px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(140%); background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 14px 12px 18px; display: flex; gap: 14px; align-items: center; box-shadow: 0 12px 40px rgba(0,0,0,.3); transition: transform .25s; z-index: 50; width: min(520px, calc(100vw - 32px)); font-size: 15px; }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast .btn { flex: none; }

/* basket */
.page-title { font-size: 28px; margin: 28px 0 18px; font-weight: 900; }
.layout { display: grid; gap: 24px; padding-bottom: 48px; }
@media (min-width: 900px) { .layout { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.panel-pad { padding: 18px; }
.line { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line img { width: 76px; height: 76px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.line .meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.line .title { font-weight: 800; }
.pill { display: inline-block; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 1px 8px; font-size: 13.5px; font-weight: 700; margin-right: 4px; }
.pill.ini { background: var(--ink); color: #fff; border-color: var(--ink); letter-spacing: .08em; }
.line .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.line .money { font-weight: 800; }
.line .unit { font-size: 13px; color: var(--muted); }
.line .deal { font-size: 13px; color: var(--gold-text); font-weight: 700; }
.qty.small button { width: 36px; height: 36px; font-size: 18px; }
.qty.small span { min-width: 34px; }
.totals { display: grid; gap: 8px; }
.totals div { display: flex; justify-content: space-between; }
.totals .discount { color: var(--gold-text); font-weight: 700; }
.totals .grand { font-size: 20px; font-weight: 900; border-top: 2px solid var(--ink); padding-top: 10px; margin-top: 4px; }
.notice { border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.notice.info { background: #f0f9ff; border: 1px solid #b9e6fe; }
.notice.warn { background: #fffaeb; border: 1px solid #fedf89; }
.notice.bad { background: #fef3f2; border: 1px solid #fecdca; color: var(--danger); }
.notice.good { background: #ecfdf3; border: 1px solid #abefc6; }
.notice.deal { background: var(--ink); color: #fff; border: 0; }
.notice.deal b { color: var(--accent); }
.form { display: grid; gap: 14px; }
.form label > span { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 5px; }
.form .opt { font-weight: 400; color: var(--muted); }
.empty { text-align: center; padding: 48px 20px; }
.empty p { color: var(--muted); }
.stack { display: grid; gap: 16px; }

/* success / demo */
.center-card { max-width: 620px; margin: 32px auto 48px; }
.big-status { font-size: 26px; font-weight: 900; margin: 0 0 6px; }
.spinner { width: 28px; height: 28px; border: 4px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.demo-pay { border: 4px dashed #1a1a1a; background: #fffbe6; }
.demo-pay h1 { margin: 0 0 6px; font-size: 24px; }

/* footer */
.site-footer { background: var(--soft); border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 10px; }
.site-footer b { color: var(--ink); }
