@font-face { font-family: 'Barlow Condensed'; font-weight: 500; font-display: swap; src: url('/assets/fonts/barlow-condensed-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url('/assets/fonts/barlow-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url('/assets/fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url('/assets/fonts/barlow-latin-500-normal.woff2') format('woff2'); }

:root {
  /* Brand colours sampled from the PBC Darts Store Ltd logo. */
  --black: #000000;       /* logo background, header, footer */
  --red: #e62326;         /* "PBC" lettering; white text on it passes WCAG AA */
  --red-dark: #c41d20;    /* hover, and red text on white */
  --green: #1c7941;       /* bullseye ring */
  --green-tint: #e8f3ec;
  --red-tint: #fdecec;
  --paper: #ffffff;
  --wash: #f3f3f3;
  --ink: #141414;
  --muted: #5c5c5c;
  --line: #dcdcdc;
  --amber: #7a4e00;
  --amber-tint: #fff1d6;
  /* Red and green trim, as on the shop fascia */
  --trim: repeating-linear-gradient(90deg, var(--red) 0 3rem, var(--black) 3rem 3.4rem, var(--green) 3.4rem 6.4rem, var(--black) 6.4rem 6.8rem);

  --display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif-condensed, sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --radius: 6px;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.site-header :focus-visible, .site-footer :focus-visible, .board :focus-visible { outline-color: #fff; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.05; letter-spacing: -0.005em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.lede { font-size: 1.1875rem; color: var(--muted); max-width: 38rem; }
.small { font-size: 0.875rem; color: var(--muted); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 44rem; }
.section { margin-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.page-head { padding-block: clamp(1.5rem, 4vw, 3rem) 1rem; }
.prose { max-width: 38rem; }
.notice { background: var(--amber-tint); color: var(--amber); padding: 0.75rem 1rem; border-radius: var(--radius); }

.skip { position: absolute; left: -999px; top: 0; background: var(--black); color: var(--paper); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.25rem; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--paper); color: var(--ink); font: 500 1rem/1 var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--wash); color: var(--ink); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-block { width: 100%; }
.btn[aria-busy='true'] { opacity: 0.7; cursor: progress; }
.link-button { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 0.2em; cursor: pointer; }

/* Header */
.site-header { background: var(--black); color: #fff; position: sticky; top: 0; z-index: 5; }
.site-header::after { content: ''; display: block; height: 5px; background: var(--trim); }
.header-row { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; }
.logo { display: block; flex-shrink: 0; }
.logo img { height: 2.75rem; width: auto; }
@media (min-width: 48rem) { .logo img { height: 3.25rem; } }
.main-nav { display: flex; gap: 1.25rem; margin-left: auto; }
.main-nav a, .basket-link { color: #fff; text-decoration: none; font-weight: 500; }
.main-nav a:hover, .basket-link:hover { color: #fff; box-shadow: inset 0 -2px 0 #fff; }
.main-nav a[aria-current='page'] { box-shadow: inset 0 -2px 0 var(--red); }
.basket-link { display: inline-flex; align-items: center; gap: 0.4rem; }
.basket-count { min-width: 1.5rem; height: 1.5rem; padding: 0 0.35rem; border-radius: 999px; background: #2b2b2b; color: #fff; font: 600 0.9375rem/1.5rem var(--display); text-align: center; }
.basket-count.has-items { background: var(--red); }
@media (max-width: 34rem) { .header-row { gap: 0.75rem; } .logo img { height: 2.25rem; } .main-nav { gap: 0.9rem; } .main-nav a[href='/visit/'] { display: none; } }
@media (max-width: 23rem) { .main-nav a[href='/contact/'] { display: none; } }

/* Hero and the hours board (the one loud element on the site) */
.hero { display: grid; gap: 2rem; padding-block: clamp(2rem, 6vw, 4.5rem); align-items: start; }
.hero h1 { max-width: 12ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
@media (min-width: 56rem) { .hero { grid-template-columns: 1.3fr 1fr; } }

.board { background: var(--black); color: #fff; border-radius: 10px; padding: 1.5rem; }
.board a { color: #fff; }
.board-title { font-size: 1.5rem; margin-bottom: 0.25rem; }
.board-status { font: 500 1.25rem/1.3 var(--display); margin: 0 0 1rem; min-height: 1.3em; }
.board-hours { width: 100%; border-collapse: collapse; font-family: var(--display); font-size: 1.3125rem; }
.board-hours th, .board-hours td { padding: 0.3rem 0; border-top: 1px solid rgba(255, 255, 255, 0.18); font-weight: 500; }
.board-hours th { text-align: left; }
.board-hours td { text-align: right; font-variant-numeric: tabular-nums; }
.board-hours tr.today th, .board-hours tr.today td { font-weight: 600; color: #fff; }
.board-hours tr:not(.today) { color: rgba(255, 255, 255, 0.78); }
.board-hours tr.today th::before { content: ''; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.5rem; border-radius: 50%; background: var(--red); vertical-align: 0.15em; box-shadow: 0 0 0 3px var(--green); }
.board-address { margin: 1rem 0 0; }

/* Brands */
.brand-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.brand-list a { display: block; padding: 0.5rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); font: 600 1.25rem/1.2 var(--display); color: var(--ink); text-decoration: none; }
.brand-list a:hover { border-color: var(--red); color: var(--ink); box-shadow: inset 0 0 0 1px var(--red); }

/* Product grid */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 48rem) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 72rem) { .section .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card a { display: block; color: var(--ink); text-decoration: none; }
.card-img { aspect-ratio: 1; background: var(--wash); border-radius: var(--radius); overflow: hidden; margin-bottom: 0.6rem; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-brand { font-size: 0.875rem; color: var(--muted); margin: 0; }
.card-title { font-family: var(--body); font-weight: 500; font-size: 1rem; line-height: 1.35; margin: 0.1rem 0 0.3rem; }
.card a:hover .card-title { text-decoration: underline; }
.card-price { font: 600 1.375rem/1.1 var(--display); margin: 0; }
.card-price s { font-weight: 500; color: var(--muted); font-size: 1.0625rem; margin-left: 0.25rem; }
.card-status { font-size: 0.875rem; color: var(--red-dark); margin: 0.25rem 0 0; }
.img-placeholder { width: 100%; height: 100%; min-height: 10rem; display: grid; place-items: center; background: var(--wash); color: var(--muted); font-size: 0.875rem; }

/* Shop filters */
.shop { display: grid; gap: 1.5rem; padding-bottom: 4rem; }
@media (min-width: 56rem) { .shop { grid-template-columns: 14rem 1fr; } }
.filters { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
@media (min-width: 56rem) { .filters { grid-template-columns: 1fr; position: sticky; top: 5rem; } }
.result-count { color: var(--muted); margin-bottom: 1rem; }
.empty { padding: 2rem 0; }

/* Form fields */
.field { display: grid; gap: 0.3rem; font-size: 0.9375rem; font-weight: 500; }
.field input, .field select, .field textarea, .qty input { width: 100%; min-height: 2.75rem; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); font: 400 1rem/1.4 var(--body); }
.field input:focus, .field select:focus, .field textarea:focus, .qty input:focus { border-color: var(--ink); outline: 2px solid var(--red); outline-offset: 0; }
.field-error { color: var(--red-dark); font-weight: 400; min-height: 1.2em; }
.field.invalid input, .field.invalid textarea { border-color: var(--red-dark); }
.check, .radio { display: flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; font-weight: 500; }
.check input, .radio input { width: 1.25rem; height: 1.25rem; accent-color: var(--red); }

/* Product page */
.crumbs { font-size: 0.9375rem; color: var(--muted); padding-block: 1rem 0.5rem; }
.crumbs a { color: var(--muted); }
.product { display: grid; gap: 1.5rem 3rem; padding-bottom: 4rem; }
@media (min-width: 56rem) { .product { grid-template-columns: 1fr 1fr; align-items: start; } .product-media { position: sticky; top: 5rem; } }
.product-media { aspect-ratio: 1; background: var(--wash); border-radius: var(--radius); overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-brand { color: var(--muted); margin: 0; }
.product-title { font-size: clamp(2rem, 5vw, 3rem); margin: 0.1rem 0 0.75rem; }
.product-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 0.75rem; }
.price { font: 600 2.5rem/1 var(--display); font-variant-numeric: tabular-nums; }
.was { color: var(--muted); font: 500 1.375rem/1 var(--display); }
.status { font-size: 0.875rem; font-weight: 500; padding: 0.2rem 0.6rem; border-radius: var(--radius); align-self: center; }
.status-in_stock { background: var(--green-tint); color: var(--green); }
.status-low_stock { background: var(--amber-tint); color: var(--amber); }
.status-backorder { background: var(--wash); color: var(--ink); }
.status-out_of_stock { background: var(--red-tint); color: var(--red-dark); }
.summary { color: var(--muted); }

.option-group { border: 0; margin: 0 0 1.25rem; padding: 0; }
.option-group legend { font-weight: 500; margin-bottom: 0.5rem; padding: 0; }
.option-group legend span { color: var(--muted); font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { min-width: 4rem; min-height: 3rem; padding: 0 0.9rem; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); font: 600 1.25rem/1 var(--display); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed='true'] { border-color: var(--black); background: var(--black); color: #fff; }
.chip.unavailable { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }

.buy-row { display: flex; gap: 0.75rem; align-items: end; }
.qty { display: grid; gap: 0.3rem; font-size: 0.9375rem; font-weight: 500; width: 5.5rem; }
.btn-buy { flex: 1; min-height: 2.75rem; }
.buy-note { min-height: 1.5em; margin: 0.5rem 0 1rem; font-size: 0.9375rem; }
.buy-note.ok { color: var(--green); }
.buy-note.error { color: var(--red-dark); }
.fulfil { color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; }
.h-small { font-size: 1.375rem; margin-top: 1.5rem; }
.specs { margin: 0; }
.specs div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-top: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; text-align: right; }
.description { margin-top: 1.5rem; max-width: 38rem; }

/* Basket */
.basket { display: grid; gap: 2rem; padding-bottom: 4rem; align-items: start; }
@media (min-width: 56rem) { .basket { grid-template-columns: 1fr 22rem; } }
.basket-lines { list-style: none; margin: 0; padding: 0; }
.basket-line { display: grid; grid-template-columns: 5rem 1fr auto; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.basket-line .thumb { width: 5rem; aspect-ratio: 1; background: var(--wash); border-radius: var(--radius); overflow: hidden; }
.basket-line .thumb img { width: 100%; height: 100%; object-fit: cover; }
.basket-line .thumb .img-placeholder { min-height: 0; font-size: 0; }
.line-title { font-weight: 500; color: var(--ink); text-decoration: none; }
.line-options { color: var(--muted); font-size: 0.9375rem; margin: 0.1rem 0 0.5rem; }
.line-total { font: 600 1.375rem/1 var(--display); text-align: right; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); }
.stepper button { width: 2.5rem; height: 2.5rem; border: 0; background: none; font-size: 1.25rem; cursor: pointer; color: var(--ink); }
.stepper output { min-width: 2rem; text-align: center; font-weight: 500; }
.remove { margin-left: 0.75rem; font-size: 0.9375rem; }
.basket-problems { background: var(--amber-tint); color: var(--amber); padding: 0.75rem 1rem; border-radius: var(--radius); }
.summary-panel { background: var(--wash); border-radius: 10px; padding: 1.25rem; }
@media (min-width: 56rem) { .summary-panel { position: sticky; top: 5rem; } }
.fulfilment { border: 0; margin: 0 0 1rem; padding: 0; }
.fulfilment legend { font-weight: 500; padding: 0; }
.totals { margin: 0 0 0.75rem; }
.totals div { display: flex; justify-content: space-between; padding: 0.35rem 0; }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.totals .total { border-top: 1px solid var(--line); margin-top: 0.35rem; padding-top: 0.6rem; font: 600 1.625rem/1 var(--display); }
.free-delivery { font-size: 0.9375rem; color: var(--muted); min-height: 1.2em; }
.checkout-error { color: var(--red-dark); min-height: 1.2em; margin: 0.5rem 0; }

/* About */
.about { display: grid; gap: 1.5rem 3rem; padding-bottom: 2rem; align-items: start; }
@media (min-width: 56rem) { .about { grid-template-columns: 1fr 1.1fr; } }
.about-photo { margin: 0; aspect-ratio: 3 / 4; max-height: 40rem; background: var(--wash); border-radius: var(--radius); overflow: hidden; }
.shopfront { margin: 1.5rem 0 0; border-radius: var(--radius); overflow: hidden; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.about .prose h2 { margin-top: 1.5rem; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.gallery img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); }
.footer-base p { margin: 0 0 0.35rem; }

/* Two column pages and contact */
.two-col { display: grid; gap: 2rem 3rem; padding-bottom: 4rem; align-items: start; }
@media (min-width: 56rem) { .two-col { grid-template-columns: 1.2fr 1fr; } }
.contact-form { display: grid; gap: 1rem; max-width: 36rem; }
.form-status { min-height: 1.5em; }
.form-status.ok { color: var(--green); }
.form-status.error { color: var(--red-dark); }

/* Footer */
.site-footer { background: var(--black); color: #e6e6e6; margin-top: 2rem; }
.site-footer::before { content: ''; display: block; height: 5px; background: var(--trim); }
.site-footer a { color: #e6e6e6; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 1.5rem; padding-block: 2.5rem 1.5rem; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid nav { display: grid; align-content: start; gap: 0.4rem; }
.footer-name { font: 600 1.375rem/1.1 var(--display); color: #fff; }
.footer-base { border-top: 1px solid rgba(255, 255, 255, 0.15); padding-block: 1rem 1.5rem; font-size: 0.875rem; color: #b8b8b8; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
