/* Tewkesbury CC custom kit order — page-scoped styles.
   Loads on /tewkesbury only, on top of the shared style.css (chrome + fonts).
   Club palette: TCC navy/gold. CBM green + GRL terracotta appear as brand credits.
   Typography defers to the site (Fraunces display / Inter body). */

.kit {
  /* TCC + supporting tokens */
  --tcc-navy:   #1A2E5A;
  --tcc-navyMid:#243F7A;
  --tcc-navyLt: rgba(26,46,90,0.07);
  --tcc-gold:   #C89B30;
  --tcc-goldLt: #F5EDD6;
  --tcc-terra:  #C4724A;
  --tko-cream:  #F5F2EB;
  --tko-border: #E0DBD2;
  --tko-muted:  #7A7570;
  --tko-text:   #1C1C1C;

  background: var(--tko-cream);
  color: var(--tko-text);
  font-family: var(--sans);
}

/* ─── Club identity band ─────────────────────────────────────────── */
.tko-hero {
  background: var(--tcc-navy);
  border-bottom: 3px solid var(--tcc-gold);
}
.tko-hero__inner {
  max-width: 980px;
  margin: 0 auto;
  /* top padding clears the site's fixed header (~72px solid) */
  padding: 6rem var(--gutter) clamp(1.5rem, 4vw, 2.25rem);
}
.tko-hero__club { display: flex; align-items: center; gap: 16px; }
.tcc-crest { flex-shrink: 0; line-height: 0; }
.tcc-crest img {
  width: 66px; height: 66px; display: block;
  border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 2px rgba(200,155,48,0.55), 0 2px 8px rgba(0,0,0,0.25);
}
.tko-hero__eyebrow {
  margin: 0 0 2px;
  color: var(--tcc-gold);
  font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.tko-hero__titles h1 {
  margin: 0;
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  line-height: 1.1;
}
.tko-hero__supplier {
  margin: 3px 0 0;
  color: rgba(255,255,255,0.55);
  font-size: 0.8rem;
}
.tko-hero__lead {
  margin: 16px 0 0;
  max-width: 560px;
  color: rgba(255,255,255,0.7);
  font-size: 0.92rem;
  line-height: 1.65;
}
.tko-hero__lead strong { color: var(--tcc-gold); }

/* Downloadable references (sizing guide + kit designs) */
.tko-refs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.tko-ref {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 9px 16px 9px 13px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--tcc-gold);
  border-radius: 8px; text-decoration: none; transition: background 0.15s;
}
.tko-ref:hover { background: rgba(200,155,48,0.18); }
.tko-ref svg { width: 22px; height: 22px; color: var(--tcc-gold); flex-shrink: 0; }
.tko-ref span { display: block; color: rgba(255,255,255,0.6); font-size: 0.72rem; }
.tko-ref strong { display: block; color: #fff; font-size: 0.86rem; font-weight: 700; }

/* ─── Sticky section nav ─────────────────────────────────────────── */
.tko-secnav {
  /* this page's header is always is-solid (~77px), so it never shrinks */
  position: sticky; top: 78px; z-index: 30;
  background: #fff;
  border-bottom: 1px solid var(--tko-border);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.tko-secnav__inner {
  max-width: 980px; margin: 0 auto;
  display: flex; padding: 0 var(--gutter);
}
.tko-secnav__btn {
  padding: 13px 16px;
  background: none; border: none;
  border-bottom: 2px solid transparent;
  font: inherit; font-size: 0.82rem; font-weight: 600;
  color: #6B6560; cursor: pointer; white-space: nowrap;
  transition: color 0.15s;
}
.tko-secnav__btn.is-active { color: var(--tcc-navy); border-bottom-color: var(--tcc-gold); }
.tko-secnav__count {
  display: inline-block; margin-left: 5px;
  background: var(--tcc-gold); color: #fff;
  border-radius: 10px; font-size: 0.62rem; font-weight: 700;
  padding: 1px 6px; vertical-align: middle;
}

/* ─── Layout ─────────────────────────────────────────────────────── */
.tko-body { padding-top: 22px; padding-bottom: 60px; }
.tko-layout {
  max-width: 980px; margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr 320px;
  gap: 22px; align-items: start;
}

/* ─── Section cards + item rows ──────────────────────────────────── */
.tko-section {
  background: #fff; border: 1px solid var(--tko-border);
  border-radius: 10px; padding: 22px 20px; margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  /* section jumps land below the fixed header + sticky section-nav */
  scroll-margin-top: 134px;
}
.tko-section__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 2px solid var(--tcc-navy);
}
.tko-section__title { margin: 0; font-family: var(--serif); font-size: 1.2rem; color: var(--tcc-navy); }
.tko-section__tagline { font-size: 0.74rem; color: var(--tko-muted); }
.tko-section__tally {
  background: var(--tcc-navy); color: #fff; border-radius: 20px;
  font-size: 0.66rem; font-weight: 700; padding: 3px 12px;
  flex-shrink: 0; margin-left: 10px; white-space: nowrap;
}
.tko-section__notice {
  margin: -6px 0 16px; padding: 10px 12px;
  background: var(--tcc-goldLt); border: 1px solid var(--tcc-gold);
  border-radius: 7px; font-size: 0.78rem; color: var(--tcc-navy); line-height: 1.5;
}

.tko-item {
  padding: 9px 10px; border-radius: 7px; margin-bottom: 4px;
  border: 1px solid transparent; transition: background 0.12s, border-color 0.12s;
}
.tko-item.is-active { background: var(--tcc-navyLt); border-color: rgba(26,46,90,0.2); }
/* spacer + hairline that groups products within a section (men's vs women's, etc.) */
.tko-subgap { height: 1px; margin: 16px 6px 14px; border-top: 1px solid var(--tko-border); }
/* item | size | price | add-to-order all on one line */
.tko-item__row { display: flex; align-items: center; gap: 10px; }
.tko-item__name { flex: 1 1 auto; min-width: 0; font-size: 0.88rem; font-weight: 500; }
.tko-item__note { margin-left: 6px; font-size: 0.68rem; color: var(--tko-muted); font-style: italic; }
.tko-item__sizesel {
  flex: 0 0 auto; font: inherit; font-size: 0.8rem; padding: 5px 8px;
  border: 1px solid var(--tko-border); border-radius: 5px;
  color: var(--tko-text); background: #fff; cursor: pointer;
}
.tko-item__onesize { flex: 0 0 auto; font-size: 0.72rem; color: var(--tko-muted); }
.tko-item__price { flex: 0 0 auto; min-width: 46px; text-align: right;
  font-size: 0.84rem; font-weight: 700; color: var(--tcc-gold); }

/* qty control */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--tko-border);
  border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.qty__btn {
  width: 32px; height: 32px; border: none; cursor: pointer;
  font-size: 1.05rem; font-weight: 700; background: var(--tcc-navy); color: #fff;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.qty__btn--minus { background: #EAE7E0; color: #bbb; }
.tko-item.is-active .qty__btn--minus { background: var(--tcc-navy); color: #fff; }
.qty__val { width: 34px; text-align: center; font-size: 0.85rem; font-weight: 700;
  color: var(--tko-muted); user-select: none; }
.tko-item.is-active .qty__val { color: var(--tcc-navy); }

/* ─── Order summary ──────────────────────────────────────────────── */
.tko-summary { position: sticky; top: 130px; }
.tko-summary__card {
  background: #fff; border: 1px solid var(--tko-border); border-radius: 10px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.09); overflow: hidden;
}
.tko-summary__head {
  background: var(--tcc-navy); padding: 15px 18px;
  display: flex; justify-content: space-between; align-items: center;
}
.tko-summary__head span { color: #fff; font-family: var(--serif); font-size: 1rem; font-weight: 700; }
.tko-summary__badge {
  background: var(--tcc-gold); color: #fff; border-radius: 20px;
  font-size: 0.68rem; font-weight: 700; padding: 2px 11px;
}
.tko-summary__body { padding: 16px 18px; }

.tko-empty { color: #C0BAB2; font-size: 0.82rem; text-align: center;
  font-style: italic; padding: 12px 0; margin: 0; }

.tko-line { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 9px; }
.tko-line__name { font-size: 0.82rem; font-weight: 600; }
.tko-line__meta { font-size: 0.72rem; color: var(--tko-muted); }
.tko-line__price { font-size: 0.82rem; font-weight: 700; color: var(--tcc-gold); margin-left: 10px; flex-shrink: 0; }

.tko-personalise {
  background: var(--tcc-goldLt); border: 1px solid var(--tcc-gold);
  border-radius: 8px; padding: 14px; margin: 14px 0;
}
.tko-personalise__title { font-size: 0.68rem; font-weight: 700; color: var(--tcc-navy);
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 12px; }
.tko-personalise__item { margin-bottom: 14px; }
.tko-personalise__item:last-child { margin-bottom: 0; }
.tko-personalise__label { font-size: 0.78rem; font-weight: 700; color: var(--tcc-navy); margin-bottom: 6px; }
.tko-personalise__label span { font-weight: 400; color: var(--tko-muted); margin-left: 6px; }
.tko-personalise__fields { display: grid; grid-template-columns: 1fr 84px; gap: 8px; }

.tko-field { margin-bottom: 10px; }
.tko-field > label, .tko-fieldlabel {
  display: block; font-size: 0.62rem; font-weight: 700; color: #6B6560;
  margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.05em;
}
.tko-input, .tko-textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 0.82rem;
  padding: 9px 11px; border: 1px solid var(--tko-border); border-radius: 5px;
  color: var(--tko-text); background: #fff;
}
.tko-textarea { resize: vertical; min-height: 64px; }
.tko-mini { padding: 7px 10px; font-size: 0.78rem; }

.tko-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; margin-bottom: 18px;
  border-top: 1px solid var(--tko-border); border-bottom: 1px solid var(--tko-border);
}
.tko-total__label { font-size: 0.82rem; font-weight: 700; color: var(--tcc-navy); }
.tko-total__value { font-size: 1.4rem; font-weight: 700; color: var(--tcc-gold); font-family: var(--serif); }

.tko-details-title { font-size: 0.68rem; font-weight: 700; color: var(--tcc-navy);
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 12px; }

.tko-submit {
  width: 100%; padding: 14px; border: none; border-radius: 7px;
  background: var(--tcc-navy); color: #fff; font-family: var(--serif);
  font-size: 0.95rem; font-weight: 700; letter-spacing: 0.02em; cursor: pointer;
  transition: background 0.15s;
}
.tko-submit:disabled { background: #D8D3C8; cursor: default; }
.tko-submit.is-sent { background: var(--willow); }
.tko-wa {
  width: 100%; margin-top: 10px; padding: 12px; border: 1px solid var(--tko-border);
  border-radius: 7px; background: #fff; color: var(--tcc-navy);
  font: inherit; font-weight: 700; font-size: 0.85rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.tko-wa svg { width: 18px; height: 18px; fill: #25D366; }
.tko-hint { font-size: 0.72rem; color: var(--tko-muted); text-align: center; margin: 10px 0 0; line-height: 1.5; }
.tko-hint--warn { color: #C0BAB2; margin-top: 7px; }

/* ─── Mobile sticky bar + sheet ──────────────────────────────────── */
.tko-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: var(--tcc-navy); box-shadow: 0 -2px 14px rgba(0,0,0,0.25);
}
.tko-bar__btn {
  width: 100%; padding: 14px 20px; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; color: #fff;
}
.tko-bar__left { display: flex; align-items: center; gap: 10px; }
.tko-bar__count { background: var(--tcc-gold); color: #fff; border-radius: 20px;
  font-size: 0.8rem; font-weight: 700; padding: 3px 12px; }
.tko-bar__label { font-size: 0.85rem; font-weight: 600; }
.tko-bar__right { display: flex; align-items: center; gap: 10px; }
.tko-bar__total { color: var(--tcc-gold); font-family: var(--serif); font-size: 1.15rem; font-weight: 700; }
.tko-bar__chev { color: rgba(255,255,255,0.5); font-size: 1.3rem; }

.tko-sheet { position: fixed; inset: 0; z-index: 100; display: none; }
.tko-sheet.is-open { display: block; }
.tko-sheet__scrim { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.tko-sheet__panel {
  position: absolute; bottom: 0; left: 0; right: 0; background: #fff;
  border-radius: 14px 14px 0 0; max-height: 92vh; overflow-y: auto;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
}
.tko-sheet__head {
  position: sticky; top: 0; z-index: 1; background: var(--tcc-navy);
  padding: 16px 18px; border-radius: 14px 14px 0 0;
  display: flex; justify-content: space-between; align-items: center;
}
.tko-sheet__head span { color: #fff; font-family: var(--serif); font-size: 1rem; font-weight: 700; }
.tko-sheet__close { background: none; border: none; color: rgba(255,255,255,0.7);
  font-size: 1.7rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.tko-sheet__body { padding: 18px 16px 36px; }

/* The summary lives in the sidebar (desktop) and is cloned into the sheet (mobile) */
.tko-summary__sheet-mount { display: none; }

@media (max-width: 860px) {
  .tko-layout { grid-template-columns: 1fr; }
  .tko-summary { display: none; }          /* hidden; content moves into the sheet */
  .tko-body { padding-bottom: 80px; }       /* room for the sticky bar */
  .qty__btn { width: 38px; height: 38px; }  /* bigger touch targets */
  .qty__val { width: 34px; }
  /* the size cell now carries chest/waist measurements, so it's too wide to keep
     name | size | price | qty on one line — wrap: name on line 1, controls on line 2 */
  .tko-item__row { gap: 8px 10px; flex-wrap: wrap; }
  .tko-item__name { flex: 1 1 100%; }
  .tko-item__sizesel { flex: 1 1 auto; }    /* size fills line 2; price + qty sit to the right */
}
@media (min-width: 861px) {
  .tko-bar, .tko-sheet { display: none !important; }
}
