/* Wilson's Woodworks store. Colours, fonts and shapes follow the Hugo site's
   meghna theme (src/themes/meghna-hugo/assets/css/style.css): slate page,
   light gray menu bar, green accent, Anaheim + Quattrocento Sans. */

@font-face { font-family: "Anaheim"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/anaheim-400.woff2) format("woff2"); }
@font-face { font-family: "Quattrocento Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/quattrocento-sans-400.woff2) format("woff2"); }
@font-face { font-family: "Quattrocento Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/static/fonts/quattrocento-sans-700.woff2) format("woff2"); }

:root {
  --page: #353b43;        /* body */
  --panel: #292f36;       /* .section-bg, .team-member */
  --field: #2c3138;
  --nav: #bdbdbd;         /* .navigation */
  --nav-fg: #3d3d3d;      /* theme used rgba(0,0,0,.5): 3.9:1, darkened for 4.5:1 */
  --nav-active: #2b3f58;
  --text: #afbac4;        /* headings in the theme; body copy here for contrast */
  --muted: #a3adb6;       /* 5:1 on the page */
  --white: #ffffff;
  --line: rgba(236, 239, 241, 0.07);
  --line-strong: #4e595f; /* .btn-transparent: decorative rules only */
  --control: #7f8a94;     /* borders of inputs and chips: 3:1 against the page */
  --accent: #5f8e00;      /* the site's green: fills and decoration */
  --accent-text: #84bd2f; /* green text and focus rings on dark: 5:1 */
  --accent-btn: #4e7500;  /* behind white button text: 5.4:1 */
  --accent-hover: #567f00;
  --warn: #e2a85a;
  --bad: #f29488;
  --sans: "Quattrocento Sans", "Segoe UI", system-ui, sans-serif;
  --display: "Anaheim", "Quattrocento Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* a class's display rule must never un-hide an element */
html { background: var(--page); }
body { margin: 0; background: var(--page); color: var(--text); font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--sans); color: var(--white); font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.35rem; margin: 0 0 0.75rem; }
p { margin: 0 0 0.8rem; }
a { color: var(--white); text-decoration: none; transition: color .2s ease-in; }
a:hover, a:focus { color: var(--accent-text); }
main p a:not(.button), .lines td a, .issues a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
::selection { color: #fff; background: var(--accent); }
.container { max-width: 1140px; margin: 0 auto; padding: 0 15px; }
.section { padding: 60px 0 90px; }
.center { text-align: center; }
.lede { max-width: 42rem; }

/* ---- header: the site's sticky gray menu bar ---------------------------- */
.navigation { position: sticky; top: 0; z-index: 10; background: var(--nav); }
.nav-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 8px; padding-bottom: 8px; }
.brand img { height: 90px; width: auto; }
.navigation ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 0.25rem; margin: 0; padding: 0; }
.navigation li a { display: flex; align-items: center; min-height: 44px; padding: 0 0.55rem; color: var(--nav-fg); font-family: var(--display); font-size: 1.05rem; }
.navigation li a:hover, .navigation li a:focus { color: rgba(0, 0, 0, 0.85); }
.navigation li a.active { color: var(--nav-active); }
.badge { display: inline-block; margin-left: 0.3em; min-width: 1.4em; padding: 0 0.4em; background: var(--accent-btn); color: #fff;
  font-size: 0.8rem; line-height: 1.5; text-align: center; font-family: var(--sans); }
html { scroll-padding-top: 120px; }      /* focused fields never hide under the sticky bar */
@media (max-width: 640px) {
  /* On a phone a pinned bar would take a quarter of the screen: let it scroll away. */
  .navigation { position: static; }
  html { scroll-padding-top: 0; }
  .brand img { height: 56px; }
  .nav-inner { justify-content: center; padding-top: 6px; padding-bottom: 2px; }
  .navigation ul { justify-content: center; gap: 0; }
  .navigation li a { padding: 0 0.3rem; font-size: 1rem; }
}
.skip { position: absolute; left: 8px; top: -100px; z-index: 20; padding: 10px 16px; background: var(--white); color: #000; }
.skip:focus { top: 8px; color: #000; }

/* ---- section titles: "First word" white + rest green, then the rule ----- */
.title { text-align: center; padding-bottom: 40px; }
.title h1, .title h2 { font-size: clamp(1.9rem, 4vw, 2.4rem); text-transform: capitalize; margin: 0; color: var(--white); text-wrap: balance; }
.title span { color: var(--accent-text); }
.border-meghna { border-top: 2px solid var(--line); height: 1px; margin: 15px auto 0; position: relative; width: 30%; }
.border-meghna::before { content: ""; position: absolute; left: 50%; top: -4px; width: 40px; height: 6px;
  margin-left: -20px; background: var(--white); }

/* ---- category filter: the portfolio filter buttons ------------------------ */
.filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 0 0 40px; }
.filter a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border: 1px solid var(--line); color: var(--muted); font-weight: 700; }
.filter a:hover { color: var(--white); }
.filter a.active { border-color: var(--accent-text); color: var(--white); }
/* Subcategories: a second, lighter row under the main filter. */
.filter:has(+ .filter.sub) { margin-bottom: 1rem; }
.filter.sub { gap: 0.4rem; }
.filter.sub a { padding: 0 14px; border-color: transparent; font-weight: 400; font-size: 0.95rem; }
.filter.sub a.active { border-color: var(--accent-text); }
.crumbs-category { margin: 0 0 0.75rem; text-align: center; }
.category + .category { margin-top: 50px; }
.category h2 { font-size: 1.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.category h2 a { color: var(--white); }
.category h2 a:hover { color: var(--accent-text); }

/* ---- product cards: the "store" tiles on the home page -------------------- */
.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.5rem; }
.card a { display: flex; flex-direction: column; height: 100%; background: var(--panel); color: inherit; }
.card .photo { display: block; overflow: hidden; }
.card img, .noimg { display: block; aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: #23282e; transition: transform .4s ease; }
.card a:hover img { transform: scale(1.08); }
.card .meta { display: grid; gap: 0.2rem; padding: 15px; }
.card .name { color: var(--white); font-size: 1.1rem; font-weight: 700; transition: color .2s; }
.card a:hover .name { color: var(--accent-text); }
.card .price { color: var(--text); font-variant-numeric: tabular-nums; }
.status { font-size: 0.85rem; }
.status-in_stock { color: #8fc43a; }
.status-made_to_order { color: var(--warn); }
.status-sold_out { color: var(--muted); }

/* ---- product page ---------------------------------------------------------- */
.crumbs { margin: -20px 0 1.5rem; font-size: 0.95rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent-text); }
.product { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 2.5rem; align-items: start; }
.product h1 { font-size: 2rem; margin: 0; }
.product .details { display: grid; gap: 1rem; min-width: 0; }
.product .sku { margin: -0.5rem 0 0; font-size: 0.95rem; }
.product .gallery { min-width: 0; }
.product .gallery img, .noimg.large { background: var(--panel); }
.noimg.large { aspect-ratio: 1; }
/* Photo strip under the main photo; scrolls sideways when it doesn't fit. */
.thumbs { list-style: none; display: flex; gap: 0.5rem; margin: 0.75rem 0 0; padding: 0 0 4px; overflow-x: auto; }
.thumbs li { flex: none; }
.thumbs button { display: block; min-height: 0; width: 4.5rem; height: 4.5rem; padding: 0; border: 2px solid transparent;
  background: var(--panel); cursor: pointer; }
.thumbs button[aria-pressed="true"] { border-color: var(--accent-text); }
.thumbs button:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product .price { font-size: 1.5rem; color: var(--white); margin: 0; font-variant-numeric: tabular-nums; }
.description p { margin: 0 0 0.6rem; }
.picker { display: grid; gap: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { color: var(--white); font-weight: 700; margin-bottom: 0.5rem; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0.35rem 0.9rem; border: 1px solid var(--control); color: var(--text); cursor: pointer; transition: border-color .2s, background .2s; }
.chip span:hover { border-color: var(--accent-text); }
.chip input:checked + span { border-color: var(--accent-text); background: var(--accent-btn); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.chip input:disabled + span { opacity: 0.35; text-decoration: line-through; cursor: not-allowed; }
.chip.unavailable span { border-style: dashed; color: var(--muted); }
.fixed-option { margin: 0; color: var(--muted); }
.availability { margin: 0; min-height: 1.5em; color: var(--muted); }
.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.buy input { width: 5rem; }
.added { margin: 0; }

/* ---- forms and buttons: .form-meghna and .btn-main ------------------------ */
input, textarea, select, button, .button { font: inherit; }
label { color: var(--text); }
input, textarea, select { min-height: 44px; padding: 0.5rem 0.65rem; border: 1px solid var(--control); border-radius: 0;
  background: var(--field); color: var(--white); transition: border-color .2s; }
input:hover, textarea:hover, select:hover { border-color: var(--accent-text); }
input:focus, textarea:focus, select:focus { border-color: var(--accent-text); }
input[type=radio] { accent-color: var(--accent-text); width: 1.25rem; height: 1.25rem; min-height: 0; margin: 0; flex: none; }
select option { background: var(--field); color: var(--white); }
button, .button { display: inline-block; min-height: 44px; padding: 10px 30px; border: 1px solid var(--control); border-radius: 0;
  background: transparent; color: #fff; cursor: pointer; text-align: center; transition: all .3s ease-in; }
button:hover, .button:hover { background: var(--accent-btn); border-color: transparent; color: #fff; }
button.primary, .button.primary { background: var(--accent-btn); border-color: var(--accent-btn); color: #fff;
  font-size: 14px; letter-spacing: 1px; text-transform: uppercase; padding: 12px 35px; }
button.primary:hover, .button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
button:disabled, button:disabled:hover { opacity: 0.45; cursor: not-allowed; background: transparent; border-color: var(--line-strong); }
button.primary:disabled, button.primary:disabled:hover { background: var(--accent-btn); border-color: var(--accent-btn); }
button.link { border: 0; padding: 0.5rem 0.25rem; background: none; color: var(--muted); text-decoration: underline; text-transform: none; letter-spacing: 0; }
button.link:hover { background: none; color: var(--bad); }
button:focus-visible, .button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex="-1"]:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.navigation a:focus-visible { outline-color: var(--nav-active); }

/* ---- cart ------------------------------------------------------------------ */
.cart, .checkout-cart, .review, .done, .quote-panel { background: var(--panel); padding: 25px; }
.table-scroll { overflow-x: auto; }
.lines { width: 100%; border-collapse: collapse; }
.lines th { color: var(--muted); font-weight: 400; font-size: 0.9rem; }
.lines th, .lines td { text-align: left; padding: 0.7rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines td a { color: var(--white); font-weight: 700; }
.lines td a:hover { color: var(--accent); }
.lines .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lines input { width: 4.2rem; }
.lines tr.blocked td { color: var(--muted); }
.muted { color: var(--muted); }
.note { color: var(--warn); font-size: 0.9rem; }
.issues { color: var(--bad); padding-left: 1.2rem; }
.error { color: var(--bad); border-left: 3px solid var(--bad); padding: 0.4rem 0.75rem; background: rgba(242, 148, 136, 0.08); }
.fulfillment { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin: 1.4rem 0 0.5rem; }
.fulfillment label { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; cursor: pointer; }
.fulfillment legend { width: 100%; }
.totals { display: grid; grid-template-columns: auto auto; justify-content: end; gap: 0.35rem 2rem; font-variant-numeric: tabular-nums; margin: 1.2rem 0 0; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; text-align: right; color: var(--white); }
.cart > .primary, .cart > .button { margin-top: 1.5rem; }
.cart > .button.primary { float: right; }
.cart::after { content: ""; display: table; clear: both; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- quote ----------------------------------------------------------------- */
.quote { display: grid; gap: 0.4rem; max-width: 34rem; margin-top: 1.5rem; }
.quote button { margin-top: 1rem; justify-self: start; }
[data-quote-cart]:not(:empty) { margin-top: 1.5rem; }

/* ---- checkout ---------------------------------------------------------------- */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } }
.checkout-cart .cart { padding: 0; background: none; }
.checkout-cart > p:last-child { margin: 1rem 0 0; }
.checkout-form { display: grid; gap: 1.6rem; min-width: 0; }
.checkout-form fieldset:not(.fulfillment) { display: grid; gap: 0.35rem; }
.checkout-form fieldset label { margin-top: 0.35rem; }
.checkout-form .fulfillment { margin: 0; }
.checkout-form .fulfillment label { margin-top: 0; }
.checkout-form input:not([type=radio]), .checkout-form select { width: 100%; }
.row3 { display: grid; grid-template-columns: 2fr 1.4fr 1fr; gap: 0.75rem; }
.row3 > div { display: grid; gap: 0.35rem; min-width: 0; }
@media (max-width: 30rem) { .row3 { grid-template-columns: 1fr 1fr; } .row3 > div:first-child { grid-column: 1 / -1; } }
.review h2 { margin-bottom: 0.25rem; }
.review .totals { justify-content: stretch; grid-template-columns: 1fr auto; }
.totals .grand { font-weight: 700; font-size: 1.15rem; color: var(--white); border-top: 1px solid var(--line-strong); padding-top: 0.45rem; margin-top: 0.2rem; }
#card-container { min-height: 90px; }
.small { font-size: 0.85rem; margin: 0; }
.terms-note { margin-top: 0.5rem; }
.checkout-form [data-submit] { justify-self: start; min-width: 14rem; }
.done { grid-column: 1 / -1; max-width: 40rem; margin: 0 auto; text-align: center; padding: 40px 30px; border-top: 3px solid var(--accent); }
.done:focus { outline: none; }
.done h2 { font-size: 1.8rem; }
.done .ref { font-size: 1.3rem; color: var(--white); letter-spacing: 2px; }
.done .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 1.5rem; }

/* ---- footer: .section-bg with logo and copyright ------------------------------ */
.footer { background: var(--panel); text-align: center; color: var(--muted); font-size: 0.9rem; }
.copyright { padding: 50px 0 30px; }
.copyright img { display: inline-block; height: 42px; width: auto; margin-bottom: 15px; background: var(--nav); padding: 4px 10px; }
.copyright p { margin: 0.4rem auto; max-width: 40rem; }
.footer a { color: var(--text); }
.footer a:hover { color: var(--accent); }

/* ---- small screens ------------------------------------------------------------ */
@media (max-width: 560px) {
  .section { padding: 36px 0 60px; }
  .title { padding-bottom: 28px; }
  .cart, .checkout-cart, .review, .done, .quote-panel { padding: 18px 15px; }
  /* Cart lines become cards: name on top, then quantity, price and Remove. */
  .lines thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lines, .lines tbody { display: block; }
  .lines tr { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "item item item" "qty price remove";
    align-items: center; gap: 0.5rem 0.75rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
  .lines td { display: block; padding: 0; border: 0; }
  .lines td:nth-child(1) { grid-area: item; }
  .lines td:nth-child(2) { grid-area: qty; text-align: left; }
  .lines td:nth-child(3) { grid-area: price; }
  .lines td:nth-child(4) { grid-area: remove; }
  .lines td:nth-child(2)::before { content: "Qty "; color: var(--muted); }
  .lines td:empty { display: none; }
  .cart > .button.primary { float: none; display: block; width: 100%; }
  .buy { display: grid; grid-template-columns: auto 6rem 1fr; }
  .buy button { grid-column: 1 / -1; width: 100%; }
  .checkout-form [data-submit] { justify-self: stretch; width: 100%; }
  .done { padding: 28px 18px; }
  .done .actions .button { width: 100%; }
}

/* ---- user preferences ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .card a:hover img { transform: none; }
}
@media (forced-colors: active) {
  /* The chip's own radio is invisible, so mark the chosen one with a system colour. */
  .chip input:checked + span { outline: 3px solid Highlight; outline-offset: 2px; }
  .badge { border: 1px solid CanvasText; }
  .thumbs button[aria-pressed="true"] { border-color: Highlight; }
}
