/*
Theme Name: Buytac
Theme URI: https://buytac.com
Author: Alexander Bordbar, Philex Enterprises, Inc.
Author URI: https://philex.net
Description: Custom WooCommerce storefront for Buytac — precision PCP air rifles, pellets, slugs and optics. Original theme built to the Buytac brand system.
Version: 1.5.0
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: buytac
Tags: e-commerce, woocommerce, custom-menu, featured-images, responsive
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
  --bg:            #f0f0f0;
  --surface:       #ffffff;
  --surface-alt:   #e7e7e7;
  --text:          #1a1a1a;
  --text-soft:     #5c5c5c;
  --text-faint:    #8a8a8a;
  --line:          rgba(26, 26, 26, 0.12);

  --blue-900:      #12315e;
  --blue-700:      #1b4f96;
  --blue-500:      #2b6fc4;
  --blue-400:      #1483c7;
  --blue-300:      #4a95d8;
  --gradient-blue: linear-gradient(90deg, #14356b 0%, #2f7cc9 55%, #4a95d8 100%);

  --yellow:        #f0c417;
  --yellow-dark:   #d9af0c;
  --star:          #ffb74a;
  --sale:          #f83a3a;

  --container:     1350px;
  --gutter:        clamp(1rem, 4vw, 2.5rem);

  --radius-card:   8px;
  --radius-pill:   999px;

  --section-y:     clamp(3rem, 7vw, 6rem);

  --font: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Matched to the reference store's desktop type scale, measured from its
     computed styles: h1 60px, h2 48px, h3 36px, h4 32px, h5 24px, h6 20px.
     Clamps handle the smaller breakpoints. */
  --h1: clamp(2.25rem, 4.6vw, 3.75rem);
  --h2: clamp(1.75rem, 3.6vw, 3rem);
  --h3: clamp(1.5rem, 2.8vw, 2.25rem);
  --h4: clamp(1.3125rem, 2.3vw, 2rem);
  --h5: clamp(1.125rem, 1.6vw, 1.5rem);
  --h6: 1.25rem;

  --header-h: 84px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ==========================================================================
   2. Reset / base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue-500); }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .5em;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }
h4 { font-size: var(--h4); }
h5 { font-size: var(--h5); }
h6 { font-size: var(--h6); }

p { margin: 0 0 1.15em; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.25rem; }

:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 2px; }

/* clearer, on-brand focus ring for typed fields */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(43, 111, 196, .2);
}

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 900px; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2rem, 4vw, 3.5rem); }
.section--white { background: var(--surface); }

.section-head { text-align: center; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head .eyebrow {
  display: block; font-size: .8125rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); margin-bottom: .75rem;
}
.section-head p { color: var(--text-soft); max-width: 62ch; margin-inline: auto; }
.section-head--left { text-align: left; }

/* ==========================================================================
   3. Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .95rem 2.25rem;
  font-family: inherit; font-size: .9375rem; font-weight: 700; line-height: 1;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  cursor: pointer; text-align: center;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.btn { position: relative; overflow: hidden; isolation: isolate; letter-spacing: .01em; }
/* a soft highlight that sweeps across on hover — reads as depth, not gimmick */
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,.22) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform .6s var(--ease);
}
.btn:hover::before { transform: translateX(120%); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.985); box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 3px; }

.btn--dark {
  background: linear-gradient(180deg, #2a2a2a 0%, var(--text) 100%);
  color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.btn--dark:hover { background: linear-gradient(180deg, #333 0%, #000 100%); color: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.26); }

.btn--light  { background: #fff; color: var(--text); box-shadow: 0 2px 6px rgba(0,0,0,.14); }
.btn--light:hover { background: #fff; color: var(--text); box-shadow: 0 12px 28px rgba(0,0,0,.22); }

.btn--yellow {
  background: linear-gradient(180deg, #f7d33f 0%, var(--yellow) 100%);
  color: var(--text); box-shadow: 0 2px 6px rgba(200,160,10,.30);
}
.btn--yellow:hover {
  background: linear-gradient(180deg, var(--yellow) 0%, var(--yellow-dark) 100%);
  color: var(--text); box-shadow: 0 12px 26px rgba(200,160,10,.42);
}

.btn--outline { background: transparent; color: var(--text); border-color: rgba(26,26,26,.35); }
.btn--outline:hover { background: var(--text); color: #fff; border-color: var(--text); box-shadow: 0 10px 24px rgba(0,0,0,.20); }

.btn--block { width: 100%; }
.btn--sm { padding: .7rem 1.5rem; font-size: .8125rem; }

/* ==========================================================================
   4. Announcement bar
   ========================================================================== */
.announcement {
  background: var(--gradient-blue);
  color: #fff;
  text-align: center;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .01em;
  padding: .5rem 1rem;
  position: relative;
  z-index: 60;
}
.announcement a { text-decoration: underline; text-underline-offset: 2px; }
.announcement a:hover { color: #fff; opacity: .85; }

/* ==========================================================================
   5. Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.site-header__inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: var(--header-h);
  max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter);
}

/* transparent-over-hero variant (home) — stays in flow, hero is pulled up under it */
.site-header--transparent {
  background: transparent; color: #fff;
}
.site-header--transparent .logo__text { color: #fff; }
.site-header--transparent .nav__link { color: #fff; }
.site-header--transparent .header__actions a { color: #fff; }
.site-header--transparent.is-stuck {
  background: var(--bg); color: var(--text);
  box-shadow: 0 1px 0 var(--line);
}
.site-header--transparent.is-stuck .logo__text,
.site-header--transparent.is-stuck .nav__link,
.site-header--transparent.is-stuck .header__actions a { color: var(--text); }

.logo { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.logo__mark { width: 46px; height: auto; flex-shrink: 0; }
.logo__text {
  font-size: 1.9rem; font-weight: 700; letter-spacing: -0.045em;
  line-height: 1; color: var(--text); position: relative;
}
.logo__text sup {
  font-size: .26em; font-weight: 700; vertical-align: super;
  top: 0; left: .1em; position: relative; letter-spacing: 0;
}

/* primary nav */
.main-nav { margin-inline: auto; }
.nav__list { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; }
.nav__link {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .5rem 0; font-size: .9375rem; font-weight: 700; color: var(--text);
}
.nav__link:hover { color: var(--blue-500); }
/* No caret glyph. The dropdown itself is the affordance; an underline that
   grows from the centre on hover reads cleaner and scales better than a
   chevron sitting after every label. */
.nav__link { position: relative; }
.nav__link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: .15rem; height: 2px;
  background: currentColor; border-radius: 2px;
  transform: scaleX(0); transform-origin: 50% 50%;
  transition: transform .28s var(--ease);
}
.nav__item:hover > .nav__link::after,
.nav__item:focus-within > .nav__link::after,
.nav__item.is-current > .nav__link::after { transform: scaleX(1); }

/* a small dot marks the items that open a panel, without shouting */
.nav__item--has-children > .nav__link { padding-right: .7rem; }
.nav__item--has-children > .nav__link::before {
  content: ''; position: absolute; right: 0; top: 50%;
  width: 4px; height: 4px; margin-top: -2px; border-radius: 50%;
  background: currentColor; opacity: .38;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.nav__item--has-children:hover > .nav__link::before,
.nav__item--has-children:focus-within > .nav__link::before {
  opacity: 1; transform: scale(1.6); background: var(--blue-500);
}

.nav__submenu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(10px);
  min-width: 250px; padding: .6rem; margin: 0; list-style: none;
  background: var(--surface); border-radius: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,.05), 0 18px 44px rgba(0,0,0,.16);
  opacity: 0; visibility: hidden;
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
/* a hoverable bridge so the panel does not close crossing the gap */
.nav__item--has-children::after {
  content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 12px;
}
.nav__submenu::before {
  content: ''; position: absolute; left: 50%; top: -6px; width: 12px; height: 12px;
  transform: translateX(-50%) rotate(45deg); background: var(--surface); border-radius: 2px;
}
.nav__item:hover > .nav__submenu,
.nav__item:focus-within > .nav__submenu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav__submenu a {
  display: block; padding: .6rem .9rem; font-size: .9rem; font-weight: 500;
  color: var(--text); white-space: nowrap; border-radius: 9px;
  transition: background-color .18s var(--ease), color .18s var(--ease), padding-left .18s var(--ease);
}
.nav__submenu a:hover { background: var(--bg); color: var(--blue-500); padding-left: 1.15rem; }

.header__actions { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
/* Bigger hit area, heavier stroke and a hover chip — the bare 22px outlines
   were washing out, especially white-on-photo over the hero. */
.header__actions a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  color: var(--text); position: relative;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.header__actions a:hover,
.header__actions a:focus-visible { background: rgba(26,26,26,.08); color: var(--blue-500); }
.header__actions svg { width: 23px; height: 23px; stroke-width: 2; }

/* over the hero photo the icons need a shadow to stay legible */
.site-header--transparent:not(.is-stuck) .header__actions a { color: #fff; }
.site-header--transparent:not(.is-stuck) .header__actions svg {
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.55));
}
.site-header--transparent:not(.is-stuck) .header__actions a:hover { background: rgba(255,255,255,.18); color: #fff; }
.site-header--transparent:not(.is-stuck) .nav__link,
.site-header--transparent:not(.is-stuck) .logo__text { text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.cart-count {
  position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px;
  display: grid; place-items: center; padding: 0 4px;
  background: var(--blue-500); color: #fff; font-size: .625rem; font-weight: 700;
  border-radius: var(--radius-pill); line-height: 1;
}
.cart-count:empty, .cart-count[data-empty="1"] { display: none; }

/* homepage spotlight product shot */
.spotlight-figure { margin: 0; text-align: center; }
.spotlight-figure img {
  display: inline-block; width: auto; max-width: min(100%, 900px);
  max-height: 460px; object-fit: contain;
}

.nav-toggle { display: none; background: none; border: 0; padding: .25rem; color: inherit; cursor: pointer; }
.nav-toggle svg { width: 26px; height: 26px; }

/* ==========================================================================
   6. Hero
   ========================================================================== */
.hero {
  position: relative; min-height: min(88vh, 780px);
  display: grid; align-items: center; overflow: hidden; background: #1c1c1c;
  margin-top: calc(-1 * var(--header-h));   /* sit under the transparent header */
  padding-top: var(--header-h);
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.42) 45%, rgba(0,0,0,.08) 100%);
}
.hero__inner { position: relative; z-index: 2; padding-block: 4rem; color: #fff; }
.hero__eyebrow { font-size: .9375rem; font-weight: 700; margin-bottom: 1rem; }
.hero__title { font-size: var(--h1); max-width: 700px; margin-bottom: 2rem; color: #fff; }
.hero__text { max-width: 46ch; margin-bottom: 2rem; color: rgba(255,255,255,.88); }

/* ==========================================================================
   7. Marquee
   ========================================================================== */
.marquee { overflow: hidden; padding-block: clamp(1rem, 3vw, 2.5rem); background: var(--bg); }
.marquee__track { display: flex; width: max-content; animation: marquee 26s linear infinite; }
.marquee__track > span {
  /* Reference runs 140px; dialled back on request — deliberately under it. */
  font-size: clamp(2rem, 6.5vw, 5.5rem); font-weight: 700; letter-spacing: -0.03em;
  color: var(--blue-500); padding-inline: 2rem; white-space: nowrap; line-height: 1.05;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ==========================================================================
   8. Category tiles
   ========================================================================== */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.tile {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--radius-card); background: #1c1c1c; aspect-ratio: 3 / 4;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.tile:hover img { transform: scale(1.05); }
.tile::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.78) 100%);
}
.tile__label {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 1.5rem; color: #fff; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em;
}
.tile__label span { display: block; font-size: .8125rem; font-weight: 500; opacity: .8; margin-top: .2rem; }

/* ==========================================================================
   9. Stats band
   ========================================================================== */
.stats { background: var(--gradient-blue); color: #fff; }
.stats__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-width: var(--container); margin-inline: auto; padding: clamp(3rem, 6vw, 5rem) var(--gutter);
}
.stat { text-align: center; padding: 1.5rem clamp(1rem, 3vw, 2.5rem); }
.stat + .stat { border-left: 1px solid rgba(255,255,255,.28); }
/* measured against the reference: its stat figures render at 72px */
.stat__value { font-size: clamp(2.5rem, 5.6vw, 4.5rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.stat__label { font-size: clamp(1.125rem, 2vw, 1.5rem); font-weight: 700; margin: .75rem 0 .85rem; }
/* reference sets this at 16px */
.stat__text { font-size: 1rem; line-height: 1.5; color: rgba(255,255,255,.92); margin: 0; max-width: 34ch; margin-inline: auto; }
@media (max-width: 767px) { .stat + .stat { border-left: 0; border-top: 1px solid rgba(255,255,255,.28); } }

/* ==========================================================================
   10. Product cards / grids
   ========================================================================== */
.product-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  list-style: none; margin: 0; padding: 0;
}
.product-card {
  background: var(--surface); border-radius: var(--radius-card); overflow: hidden;
  display: flex; flex-direction: column; position: relative;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.product-card:hover { box-shadow: 0 14px 34px rgba(0,0,0,.10); transform: translateY(-3px); }
.product-card__media { position: relative; aspect-ratio: 1 / 1; background: #fff; overflow: hidden; }
.product-card__media img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; transition: transform .5s var(--ease); }
.product-card:hover .product-card__media img { transform: scale(1.04); }
.product-card__body { padding: 1.1rem 1.35rem 1.5rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.product-card__title { font-size: .9375rem; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; margin: 0; }
.product-card__title a::after { content: ''; position: absolute; inset: 0; }
.product-card__price { font-size: .9375rem; color: var(--text-soft); margin-top: auto; padding-top: .35rem; }
.product-card__price del { opacity: .55; margin-right: .4rem; }
.product-card__price ins { text-decoration: none; color: var(--sale); font-weight: 700; }
.badge {
  position: absolute; top: .85rem; left: .85rem; z-index: 3;
  padding: .3rem .7rem; font-size: .6875rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; border-radius: var(--radius-pill);
}
.badge--sale { background: var(--sale); color: #fff; }
.badge--out  { background: #000; color: #fff; }

/* horizontal carousel */
.carousel { position: relative; }
.carousel__track {
  display: grid; grid-auto-flow: column;
  /* A minmax() with a 0 minimum lets the columns SHRINK to fit the container,
     so the track never overflows and the carousel silently stops sliding.
     Fixed track widths are what make it scroll. */
  grid-auto-columns: 76%;
  gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding-bottom: .5rem;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { scroll-snap-align: start; }
@media (min-width: 600px)  { .carousel__track { grid-auto-columns: calc(50% - .75rem); } }
@media (min-width: 900px)  { .carousel__track { grid-auto-columns: calc(33.333% - 1rem); } }
@media (min-width: 1200px) { .carousel__track { grid-auto-columns: calc(25% - 1.125rem); } }
.carousel__nav { display: flex; gap: .5rem; justify-content: flex-end; margin-bottom: 1rem; }
.carousel__btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--text); cursor: pointer;
  display: grid; place-items: center; transition: background-color .2s var(--ease);
}
.carousel__btn:hover { background: var(--text); color: #fff; border-color: var(--text); }
.carousel__btn svg { width: 16px; height: 16px; }

/* ==========================================================================
   11. Testimonials
   ========================================================================== */
.testimonial { text-align: center; max-width: 60rem; margin-inline: auto; }
.stars { display: flex; justify-content: center; gap: .25rem; margin-bottom: 1.5rem; color: var(--star); }
.stars svg { width: 20px; height: 20px; }
.testimonial__quote {
  /* reference renders these quotes at 36px */
  font-size: clamp(1.25rem, 2.8vw, 2.25rem); font-weight: 700; line-height: 1.3;
  letter-spacing: -0.02em; margin-bottom: 1.25rem; max-width: 22ch; margin-inline: auto;
}
.testimonial__author { font-size: .9375rem; color: var(--text-soft); }

/* ==========================================================================
   12. Comparison table
   ========================================================================== */
.compare-wrap { overflow-x: auto; }
.compare {
  width: 100%; min-width: 640px; border-collapse: collapse;
  background: var(--surface); border-radius: var(--radius-card); overflow: hidden;
}
.compare th, .compare td { padding: 1.15rem 1.35rem; text-align: left; border-bottom: 1px solid var(--line); font-size: .9375rem; line-height: 1.5; }
.compare thead th { background: var(--text); color: #fff; font-weight: 700; }
.compare tbody th { font-weight: 700; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare td.is-yes { color: var(--blue-500); font-weight: 700; }

/* ==========================================================================
   13. FAQ / accordion
   ========================================================================== */
.faq { max-width: 60rem; margin-inline: auto; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.35rem 0; background: none; border: 0; cursor: pointer;
  font-family: inherit; font-size: 1.0625rem; font-weight: 700; color: var(--text); text-align: left;
}
.faq__q::after {
  content: ''; flex-shrink: 0; width: .6rem; height: .6rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .25s var(--ease);
}
.faq__item.is-open .faq__q::after { transform: rotate(225deg); }
.faq__a { display: none; padding-bottom: 1.35rem; color: var(--text-soft); }
.faq__item.is-open .faq__a { display: block; }

/* ==========================================================================
   14. Newsletter + footer
   ========================================================================== */
.site-footer { background: var(--surface); padding-block: clamp(3rem, 6vw, 5rem) 2rem; }
.footer__grid {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, .75fr));
  align-items: start;
}
@media (max-width: 1023px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px)  { .footer__grid { grid-template-columns: minmax(0, 1fr); } }

.footer__pitch h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); max-width: 18ch; }
.footer__pitch p { color: var(--text-soft); font-size: .9375rem; }

.newsletter { position: relative; max-width: 26rem; margin-top: 1.5rem; }
.newsletter input[type="email"] {
  width: 100%; height: 3.25rem; padding: 0 3.5rem 0 1.25rem;
  font-family: inherit; font-size: .9375rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
}
.newsletter input::placeholder { color: var(--text-faint); }
.newsletter button {
  position: absolute; top: 50%; right: .6rem; transform: translateY(-50%);
  width: 2.15rem; height: 2.15rem; border: 0; border-radius: 50%;
  background: var(--surface-alt); color: var(--text); cursor: pointer; display: grid; place-items: center;
}
.newsletter button:hover { background: var(--text); color: #fff; }
.newsletter button svg { width: 14px; height: 14px; }

.footer__col h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1.15rem; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.footer__col a, .footer__col li { font-size: .9375rem; color: var(--text-soft); }
.footer__col a:hover { color: var(--text); }

.footer__bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.footer__legal { font-size: .875rem; color: var(--text-soft); }
.footer__legal ul { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem 0; margin: .5rem 0 0; padding: 0; }
.footer__legal li + li::before { content: '•'; margin-inline: .55rem; color: var(--text-faint); }
.payment-icons { display: flex; flex-wrap: wrap; gap: .4rem; }
.payment-icons img, .payment-icons svg { height: 24px; width: auto; border-radius: 3px; }

/* trust strip */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; text-align: center; }
.trust__item h3 { font-size: 1.0625rem; margin-bottom: .5rem; }
.trust__item p { font-size: .9375rem; color: var(--text-soft); margin: 0; }

/* ==========================================================================
   15. Age / compliance notice
   ========================================================================== */
.compliance {
  background: var(--surface-alt); color: var(--text-soft);
  font-size: .8125rem; line-height: 1.55; text-align: center; padding: 1.25rem var(--gutter);
}
.compliance strong { color: var(--text); }

/* ==========================================================================
   16. Page / post content
   ========================================================================== */
.page-hero { background: var(--surface); padding-block: clamp(2.5rem, 5vw, 4rem); text-align: center; }
.page-hero h1 { margin-bottom: .35rem; }
.breadcrumbs { font-size: .8125rem; color: var(--text-soft); }
.breadcrumbs a:hover { color: var(--text); }

.entry-content { max-width: 78ch; }
.entry-content :is(h2, h3, h4) { margin-top: 2em; }
.entry-content img { border-radius: var(--radius-card); margin-block: 1.5rem; }
.entry-content table { width: 100%; border-collapse: collapse; margin-block: 1.5rem; }
.entry-content th, .entry-content td { padding: .75rem 1rem; border: 1px solid var(--line); text-align: left; font-size: .9375rem; }
.entry-content thead th { background: var(--surface-alt); font-weight: 700; }
.entry-content blockquote {
  margin: 1.5rem 0; padding: 1rem 1.5rem; border-left: 3px solid var(--blue-500);
  background: var(--surface); font-style: italic;
}

.card-panel { background: var(--surface); border-radius: var(--radius-card); padding: clamp(1.5rem, 4vw, 3rem); }

/* blog */
.post-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.post-card { background: var(--surface); border-radius: var(--radius-card); overflow: hidden; display: flex; flex-direction: column; }
.post-card__media { aspect-ratio: 16 / 10; overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 1.5rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.post-card__meta { font-size: .8125rem; color: var(--text-faint); }
.post-card__title { font-size: 1.1875rem; margin: 0; }
.post-card__excerpt { font-size: .9375rem; color: var(--text-soft); margin: 0; }

.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 3rem; flex-wrap: wrap; }
.pagination .page-numbers {
  display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 .75rem;
  background: var(--surface); border-radius: var(--radius-pill); font-size: .9375rem; font-weight: 600;
}
.pagination .page-numbers.current { background: var(--text); color: #fff; }
.pagination .page-numbers:hover { background: var(--blue-500); color: #fff; }

/* ==========================================================================
   17. Responsive / mobile nav
   ========================================================================== */
@media (max-width: 1023px) {
  :root { --header-h: 68px; }
  .nav-toggle { display: inline-flex; order: -1; }
  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(88vw, 380px);
    background: var(--surface); padding: 5.5rem 1.75rem 2rem; margin: 0;
    transform: translateX(100%); transition: transform .3s var(--ease);
    overflow-y: auto; z-index: 70; box-shadow: -8px 0 40px rgba(0,0,0,.16);
  }
  body.nav-open .main-nav { transform: translateX(0); }
  body.nav-open { overflow: hidden; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__item { border-bottom: 1px solid var(--line); }
  .nav__link { color: var(--text) !important; padding: 1rem 0; justify-content: space-between; width: 100%; }
  .nav__submenu {
    position: static; transform: none; opacity: 1; visibility: visible;
    box-shadow: none; background: transparent; padding: 0 0 .75rem .85rem; min-width: 0;
    display: none;
  }
  .nav__item.is-open > .nav__submenu { display: block; }
  .nav__submenu a { padding: .5rem 0; }
  .nav-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 65;
    opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
  }
  body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }
  .logo__text { font-size: 1.5rem; }
  .logo__mark { width: 36px; }
}

@media (max-width: 599px) {
  .header__actions { gap: 1rem; }
  .hero { min-height: 70vh; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .product-card__body { padding: .85rem 1rem 1.15rem; }
  .product-card__title { font-size: .8125rem; }
}
