:root {
  --ink: #14324a;
  --ink-soft: #4a6275;
  --ball: #d9ec4f;
  --ball-deep: #c3d636;
  --glass: #cde8e0;
  --glass-soft: #e4f2ee;
  --mist: #f2f6f5;
  --white: #ffffff;
  --line: #d6e0de;
  --alert: #c2412a;
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.02; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p { margin: 0; }
.muted { color: var(--ink-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid var(--ink);
  transition: background-color .15s, color .15s, transform .15s;
}
.btn-ball { background: var(--ball); color: var(--ink); border-color: var(--ball); }
.btn-ball:hover { background: var(--ball-deep); border-color: var(--ball-deep); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: #0d2436; }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--white); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: .92rem; }
.link-btn { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

/* Strip + header */
.strip { background: var(--ink); color: var(--white); text-align: center; font-size: .9rem; padding: 8px var(--gutter); font-weight: 500; }
.strip strong { color: var(--ball); font-weight: 700; }
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 800; font-size: 2rem; letter-spacing: -0.05em; text-decoration: none; line-height: 1; }
.logo svg { width: 22px; height: 22px; margin-top: 6px; }
.nav { display: flex; gap: 22px; }
.nav a { text-decoration: none; font-weight: 600; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-color: var(--ink); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-form { display: flex; align-items: center; background: var(--mist); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px 0 16px; height: 44px; }
.search-form input { border: 0; background: transparent; width: 180px; outline: none; }
.search-form button { border: 0; background: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.cart-btn { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 18px; border-radius: 999px; border: 2px solid var(--ink); background: var(--white); font-weight: 700; }
.cart-count { min-width: 30px; height: 30px; padding: 0 6px; border-radius: 999px; background: var(--ball); display: grid; place-items: center; font-size: .9rem; }
.menu-btn { display: none; border: 0; background: none; width: 44px; height: 44px; }

@media (max-width: 900px) {
  .nav { display: none; }
  .search-form { display: none; }
  .menu-btn { display: grid; place-items: center; }
  .site-header .wrap { gap: 8px; }
  .nav.open { display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0; background: var(--white); padding: 12px var(--gutter) 20px; border-bottom: 1px solid var(--line); gap: 4px; }
  .nav.open a { padding: 12px 0; font-size: 1.1rem; }
}

/* Tennis ball motif */
.ball-svg .felt { fill: var(--ball); }
.ball-svg .seam { fill: none; stroke: var(--white); stroke-width: 7; stroke-linecap: round; }

/* Hero */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(48px, 7vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.7rem, 6.4vw, 5.6rem); line-height: .95; letter-spacing: -0.035em; max-width: 11ch; }
.hero .lede { margin-top: 22px; font-size: 1.15rem; max-width: 44ch; color: var(--ink-soft); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; font-weight: 600; font-size: .95rem; }
.hero .facts span { display: inline-flex; align-items: center; gap: 8px; }
.hero .facts svg { width: 18px; height: 18px; }
.hero-media { position: relative; }
.hero-media img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; border-radius: var(--r-lg); background: var(--glass); }
.hero-ball { position: absolute; width: clamp(96px, 13vw, 168px); left: clamp(-56px, -4vw, -24px); bottom: clamp(-44px, -3vw, -20px); filter: drop-shadow(0 14px 18px rgba(20,50,74,.22)); }
@media (prefers-reduced-motion: no-preference) {
  .hero-ball { animation: roll-in 1.1s cubic-bezier(.2,.8,.25,1) .2s both; }
}
@keyframes roll-in {
  from { transform: translateX(-140px) rotate(-260deg); opacity: 0; }
  to { transform: translateX(0) rotate(0); opacity: 1; }
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .hero-ball { left: auto; right: 14px; bottom: -28px; }
}

/* Sections */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head p { max-width: 52ch; margin-top: 10px; }
.white { background: var(--white); }

/* Category tiles */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cat-card { display: grid; grid-template-columns: 1fr 112px; align-items: center; gap: 12px; background: var(--glass-soft); border-radius: var(--r-md); padding: 18px 18px 18px 22px; text-decoration: none; min-height: 136px; transition: background-color .15s; }
.cat-card:hover { background: var(--glass); }
.cat-card h3 { font-size: 1.3rem; }
.cat-card p { font-size: .92rem; margin-top: 6px; }
.cat-card img { width: 112px; height: 112px; object-fit: cover; border-radius: var(--r-sm); background: var(--white); }
.cat-card .ph { width: 112px; height: 112px; border-radius: var(--r-sm); background: var(--white); }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: 1fr; } }

/* Species split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.split a { position: relative; display: block; border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: var(--white); min-height: 380px; background: var(--ink); }
.split img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split .label { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px; background: linear-gradient(to top, rgba(20,50,74,.88), rgba(20,50,74,0)); display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.split h3 { font-size: clamp(2rem, 4vw, 3rem); }
.split .label p { margin-top: 4px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } .split a { min-height: 300px; } }

/* Promise band */
.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.promises div { border-top: 3px solid var(--ink); padding-top: 18px; }
.promises h3 { margin-bottom: 8px; }
@media (max-width: 760px) { .promises { grid-template-columns: 1fr; gap: 22px; } }

/* Product grid + tile */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1080px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.tile { position: relative; display: flex; flex-direction: column; background: var(--white); border-radius: var(--r-md); padding: 10px 10px 14px; }
.tile-link { text-decoration: none; display: flex; flex-direction: column; flex: 1; }
.tile-img { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--mist); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.tile-img .alt { position: absolute; inset: 0; opacity: 0; }
.tile:hover .tile-img .alt { opacity: 1; }
.ribbons { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.ribbon { background: var(--ball); color: var(--ink); font-weight: 700; font-size: .78rem; padding: 4px 10px; border-radius: 999px; }
.tile-body { padding: 12px 4px 0; display: flex; flex-direction: column; gap: 4px; }
.tile-name { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { font-weight: 700; font-size: 1.05rem; }
.price s { font-weight: 500; color: var(--ink-soft); margin-left: 6px; font-size: .92em; }
.tile-meta { font-size: .85rem; color: var(--ink-soft); }
.swatches { display: flex; gap: 4px; }
.swatches i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line); }
.tile-action { margin-top: auto; padding-top: 12px; }
.tile-action .btn { width: 100%; }
.tile-action .note { font-size: .85rem; color: var(--ink-soft); display: block; text-align: center; padding: 10px 0; }
.err { color: var(--alert); font-size: .85rem; margin-top: 6px; }

/* Quick add panel */
.qa-scrim { position: fixed; inset: 0; background: rgba(20,50,74,.45); z-index: 40; }
.qa-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--white); border-radius: 22px 22px 0 0; padding: 20px; max-height: 85vh; overflow-y: auto; box-shadow: 0 -10px 40px rgba(20,50,74,.25); outline: none; }
@media (min-width: 768px) {
  .qa-scrim { display: none; }
  .qa-panel { position: absolute; left: auto; right: 0; bottom: 0; width: max(100%, 18rem); max-height: none; border-radius: var(--r-md); padding: 16px; border: 2px solid var(--ink); box-shadow: 0 18px 40px rgba(20,50,74,.18); }
}
.qa-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.qa-head p:first-child { font-weight: 700; }
.x-btn { border: 0; background: none; font-size: 1.6rem; line-height: 1; width: 36px; height: 36px; border-radius: 50%; }
.x-btn:hover { background: var(--mist); }

/* Option picker */
.picker { display: flex; flex-direction: column; gap: 16px; }
.picker fieldset { border: 0; margin: 0; padding: 0; }
.picker legend { font-weight: 700; font-size: .92rem; margin-bottom: 8px; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { border: 1.5px solid var(--line); background: var(--white); border-radius: 999px; padding: 8px 14px; font-size: .92rem; font-weight: 500; }
.pill:hover:not([disabled]) { border-color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pill[disabled] { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); padding: 0; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--ink); }
.swatch[disabled] { opacity: .3; cursor: not-allowed; }
.buy-row { display: flex; gap: 10px; align-items: stretch; }
.buy-row .btn { flex: 1; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); }
.qty button { border: 0; background: none; width: 40px; height: 44px; font-size: 1.2rem; }
.qty button[disabled] { opacity: .35; }
.qty span { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.hint { font-size: .88rem; color: var(--ink-soft); }
.field { width: 100%; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; background: var(--white); }
.field:focus { border-color: var(--ink); outline: none; }

/* Shop page */
.page-head { padding: clamp(28px, 5vw, 56px) 0 24px; }
.page-head h1 { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -0.03em; }
.page-head p { margin-top: 12px; max-width: 60ch; }
.crumbs { font-size: .9rem; margin-bottom: 14px; color: var(--ink-soft); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.shop { display: grid; grid-template-columns: 250px 1fr; gap: 32px; padding-bottom: 80px; align-items: start; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar select { border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 14px; background: var(--white); }
.filters-btn { display: none; }
.filters { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 26px; }
.filters h3 { font-size: 1rem; font-family: var(--body); font-weight: 700; letter-spacing: 0; margin-bottom: 10px; }
.cat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cat-list a { display: flex; justify-content: space-between; text-decoration: none; padding: 7px 12px; border-radius: 10px; }
.cat-list a:hover { background: var(--white); }
.cat-list a[aria-current="page"] { background: var(--ink); color: var(--white); font-weight: 600; }
.cat-list small { opacity: .7; }
.price-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { display: inline-flex; gap: 6px; align-items: center; background: var(--white); border: 1.5px solid var(--ink); border-radius: 999px; padding: 4px 12px; font-size: .88rem; font-weight: 600; }
.loading-dim { opacity: .55; transition: opacity .2s; }
.skeleton { background: var(--white); border-radius: var(--r-md); aspect-ratio: 3 / 4.3; }
@media (prefers-reduced-motion: no-preference) {
  .skeleton { animation: pulse 1.4s ease-in-out infinite; }
}
@keyframes pulse { 50% { opacity: .55; } }
.empty { background: var(--white); border-radius: var(--r-md); padding: 48px 24px; text-align: center; }
.empty h3 { margin-bottom: 8px; }
.more { display: flex; justify-content: center; margin-top: 28px; }
.sheet-head { display: none; }
@media (max-width: 900px) {
  .shop { grid-template-columns: 1fr; }
  .filters-btn { display: inline-flex; }
  .filters { display: none; }
  .filters.open { display: flex; position: fixed; inset: 0; z-index: 60; background: var(--mist); overflow-y: auto; padding: 20px var(--gutter) 100px; top: 0; }
  .filters.open .sheet-head { display: flex; justify-content: space-between; align-items: center; }
  .sheet-foot { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px var(--gutter); background: var(--white); border-top: 1px solid var(--line); }
  .sheet-foot .btn { width: 100%; }
}
@media (min-width: 901px) { .sheet-foot { display: none; } }

/* Product page */
.pdp { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 56px); padding: 24px 0 72px; align-items: start; }
.gallery-main { background: var(--white); border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 1; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { flex: 0 0 72px; height: 72px; padding: 0; border-radius: var(--r-sm); border: 2px solid transparent; overflow: hidden; background: var(--white); }
.thumbs button[aria-current="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.buy { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 18px; }
.buy h1 { font-size: clamp(2rem, 3.6vw, 3rem); letter-spacing: -0.025em; }
.buy .price { font-size: 1.5rem; }
.ship-note { display: flex; gap: 10px; align-items: center; background: var(--glass-soft); border-radius: var(--r-sm); padding: 12px 14px; font-weight: 500; font-size: .95rem; }
.ship-note svg { flex: 0 0 22px; height: 22px; }
.desc { background: var(--white); border-radius: var(--r-lg); padding: clamp(22px, 4vw, 44px); margin-bottom: 64px; }
.desc h2 { font-size: 1.8rem; margin-bottom: 18px; }
.rich { max-width: 72ch; }
.rich p, .rich ul, .rich ol { margin: 0 0 14px; }
.rich img { margin: 18px auto; border-radius: var(--r-sm); height: auto; }
.rich h1, .rich h2, .rich h3, .rich h4 { font-family: var(--body); font-size: 1.1rem; letter-spacing: 0; margin: 20px 0 8px; }
details.info { border-top: 1px solid var(--line); padding: 14px 0; }
details.info summary { font-weight: 700; cursor: pointer; }
@media (max-width: 860px) { .pdp { grid-template-columns: 1fr; } .buy { position: static; } }

/* Cart drawer */
.drawer-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(20,50,74,.45); display: flex; justify-content: flex-end; }
.drawer { width: 100%; max-width: 440px; height: 100%; background: var(--white); display: flex; flex-direction: column; outline: none; box-shadow: -20px 0 50px rgba(20,50,74,.2); }
@media (prefers-reduced-motion: no-preference) { .drawer { animation: slide-in .25s ease-out; } }
@keyframes slide-in { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.6rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; margin-bottom: 20px; }
.line img, .line .ph { width: 72px; height: 72px; border-radius: var(--r-sm); object-fit: cover; background: var(--mist); }
.line-name { font-weight: 600; line-height: 1.3; }
.line small { display: block; color: var(--ink-soft); font-size: .82rem; }
.line-ctrl { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.line-ctrl .qty button { width: 34px; height: 34px; }
.line-price { text-align: right; font-weight: 700; }
.line-price s { display: block; font-weight: 400; color: var(--ink-soft); font-size: .85rem; }
.drawer-extra { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.drawer-extra label { font-weight: 600; font-size: .9rem; display: flex; flex-direction: column; gap: 6px; }
.coupon { display: flex; gap: 8px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 18px 22px 22px; }
.totals { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; font-size: .95rem; }
.totals .total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; font-weight: 800; font-size: 1.1rem; }
.drawer-foot .btn { width: 100%; margin-top: 12px; }
.drawer-empty { text-align: center; padding: 56px 12px; }
.drawer-empty svg { width: 84px; margin: 0 auto 18px; }

/* Info pages */
.prose { max-width: 70ch; padding-bottom: 80px; }
.prose h2 { font-size: 1.7rem; margin: 36px 0 12px; }
.prose p, .prose ul { margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.faq details { background: var(--white); border-radius: var(--r-md); padding: 18px 22px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; font-size: 1.05rem; }
.faq details p { margin-top: 10px; color: var(--ink-soft); }

/* Footer */
.site-footer { background: var(--ink); color: var(--white); padding: 64px 0 28px; margin-top: auto; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer .logo { font-size: 2.6rem; }
.site-footer p { color: #c4d3dd; margin-top: 12px; max-width: 36ch; }
.site-footer h3 { font-family: var(--body); font-size: 1rem; letter-spacing: 0; margin-bottom: 12px; color: var(--ball); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.site-footer ul a { text-decoration: none; color: #e5edf2; }
.site-footer ul a:hover { text-decoration: underline; }
.foot-bottom { margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); font-size: .88rem; color: #a9bccb; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
