/* ── Sports Spirit — Global Styles ── */

:root {
  --bg:           #F7F4EF;
  --surface:      #FFFDF9;
  --surface-alt:  #F0EDE6;
  --border:       #E2DDD5;
  --text:         #1C1916;
  --text-muted:   #7A736A;
  --accent:       #2C5F2E;
  --accent-hover: #214A23;
  --accent-light: #EDF4ED;
  --danger:       #B94040;
  --nav-h:        64px;
  --radius:       10px;
  --shadow:       0 2px 12px rgba(0,0,0,.07);
  --max-w:        1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'DM Serif Display', serif;
  line-height: 1.2;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

.label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 72px 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background .18s, color .18s, transform .12s;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--accent-light); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 16px;
}
.btn-ghost:hover { color: var(--text); background: var(--surface-alt); }

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.35rem;
  color: var(--text);
  letter-spacing: -.01em;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.nav-cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background .15s;
}
.nav-cart-btn:hover { background: var(--accent-hover); }

.nav-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--accent);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

/* hamburger */
.nav-ham {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav-ham span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* mobile nav drawer */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
  flex-direction: column;
  gap: 4px;
  z-index: 99;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  transition: color .15s;
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover, .nav-mobile a.active { color: var(--text); }

/* ── Hero ── */
.hero {
  padding: 96px 0 80px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.hero-eyebrow {
  display: inline-block;
  margin-bottom: 16px;
}
.hero h1 { margin-bottom: 20px; max-width: 640px; margin-left: auto; margin-right: auto; }
.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 36px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Section heading ── */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 16px;
}
.section-head h2 { margin-bottom: 4px; }

/* ── Category Grid ── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .12s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.cat-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.cat-icon { font-size: 2rem; line-height: 1; }
.cat-card span { font-size: 0.88rem; font-weight: 500; color: var(--text); }

/* ── Product Grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .15s, transform .12s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.product-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--border);
  overflow: hidden;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.product-sport {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.product-name {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
  color: var(--text);
}
.product-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-footer {
  padding: 12px 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.product-price {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.product-price .from { font-size: 0.75rem; font-weight: 400; color: var(--text-muted); }
.product-variants { font-size: 0.78rem; color: var(--text-muted); }

.btn-card {
  padding: 8px 16px;
  font-size: 0.84rem;
  font-weight: 500;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  transition: background .15s;
}
.btn-card:hover { background: var(--accent-hover); }

/* ── Filter Bar (Shop page) ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 20px 0 32px;
}

.filter-chip {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  transition: all .15s;
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.filter-divider { width: 1px; height: 28px; background: var(--border); margin: 0 4px; }

.stock-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.toggle-switch {
  width: 36px;
  height: 20px;
  background: var(--border);
  border-radius: 999px;
  position: relative;
  transition: background .18s;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform .18s;
}
.toggle-switch.on { background: var(--accent); }
.toggle-switch.on::after { transform: translateX(16px); }

/* ── Shop page header ── */
.shop-header {
  padding: 48px 0 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.shop-header .container { padding-bottom: 0; }
.shop-header h1 { margin-bottom: 8px; }
.shop-header p { color: var(--text-muted); font-size: 1rem; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 72px 24px;
  color: var(--text-muted);
}
.empty-state p { margin-top: 12px; font-size: 0.95rem; }

/* ── Footer ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand .nav-logo { font-size: 1.2rem; margin-bottom: 12px; }
.footer-brand p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; max-width: 260px; }
.footer-col h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 14px; color: var(--text); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 0.88rem; color: var(--text-muted); transition: color .15s; }
.footer-col ul li a:hover { color: var(--text); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: 0.82rem; color: var(--text-muted); }

/* ── Utility ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.badge-green { background: var(--accent-light); color: var(--accent); }
.badge-red { background: #FEE9E9; color: var(--danger); }
.badge-grey { background: var(--surface-alt); color: var(--text-muted); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links, .nav-cart-btn { display: none; }
  .nav-ham { display: flex; }

  section { padding: 48px 0; }
  .hero { padding: 64px 0 56px; }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }

  .section-head { flex-direction: column; align-items: flex-start; }

  .filter-bar { gap: 6px; }
  .stock-toggle { margin-left: 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .product-img { font-size: 2rem; }
  .product-body { padding: 12px; }
  .product-name { font-size: 0.95rem; }
}
