/* ============================================================
   On — oil-ui-pro native HTML theme
   Clean, editorial athletic storefront
   ============================================================ */

:root {
  --header-h: 72px;
  --ink: #12130f;
  --ink-soft: #3d3f36;
  --paper: #f4f3ec;
  --surface: #ffffff;
  --line: #dfddd1;
  --line-strong: #c7c5b6;
  --muted: #6c6c5f;
  --accent: #0d8a44;
  --accent-ink: #0a6f37;
  --maxw: 1280px;
  --radius: 3px;
  --font-sans: "Helvetica Neue", Helvetica, Arial, "Segoe UI", system-ui, sans-serif;
}

/* ---------- reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
p,
dl,
dd,
dt {
  margin: 0;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- layout helpers ---------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.section {
  padding: clamp(3rem, 6vw, 5.5rem) 0;
}

.section-title {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
  top: 0;
}

/* ---------- header & nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(244, 243, 236, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  height: 100%;
  padding: 0 clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  flex: none;
}

.brand:hover {
  color: var(--accent);
}

.site-nav-list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 1.9rem);
}

.site-nav-list a {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0;
  position: relative;
}

.site-nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.15rem;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.site-nav-list a:hover::after,
.site-nav-list a:focus-visible::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  flex: none;
}

.nav-toggle-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 16px;
}

.nav-toggle-icon span {
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-toggle-icon span:nth-child(1) { top: 0; }
.nav-toggle-icon span:nth-child(2) { top: 7px; }
.nav-toggle-icon span:nth-child(3) { top: 14px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}

.hero-dots {
  position: absolute;
  right: 0;
  top: 0;
  width: 46%;
  height: 100%;
  background-image: radial-gradient(var(--ink) 1.3px, transparent 1.3px);
  background-size: 24px 24px;
  opacity: 0.1;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.hero-title {
  font-size: clamp(2.6rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.98;
  margin-bottom: 1.25rem;
  max-width: 18ch;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.6rem;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}

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

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- category shelf ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 170px;
  padding: 1.25rem 1.25rem 1rem;
  background: var(--surface);
  border-top: 2px solid var(--ink);
  transition: background 0.18s ease, color 0.18s ease;
}

.category-card:hover {
  background: var(--ink);
  color: var(--paper);
}

.category-name {
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.category-cta {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.category-card:hover .category-cta {
  color: var(--paper);
}

/* ---------- product grid & card ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.product-card {
  min-width: 0;
}

.product-link {
  display: block;
}

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface);
  overflow: hidden;
  border-radius: var(--radius);
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.product-link:hover .product-media img,
.product-link:focus-visible .product-media img {
  transform: scale(1.045);
}

.product-media-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--muted);
}

.product-info {
  padding: 0.9rem 0.15rem 0;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.3rem;
  overflow-wrap: anywhere;
}

.product-price {
  font-size: 0.9rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- catalog toolbar ---------- */
.catalog {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.page-head {
  padding: clamp(2.5rem, 5vw, 4rem) 0 2rem;
}

.page-head h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1 1 240px;
  min-width: 0;
}

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

.field input[type="search"],
.field select {
  width: 100%;
  min-height: 46px;
  padding: 0.5rem 0.85rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  appearance: none;
  -webkit-appearance: none;
}

.field input[type="search"]:focus,
.field select:focus {
  outline: none;
  border-color: var(--ink);
}

.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
}

.catalog-count {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- empty state ---------- */
.empty-state {
  text-align: center;
  padding: clamp(3rem, 7vw, 5rem) 1rem;
}

.empty-state p {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

/* ---------- pagination ---------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.pagination button {
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--ink);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination .pagination-page.is-current {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.pagination .pagination-nav {
  font-weight: 700;
}

/* ---------- breadcrumb (pdp) ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--ink);
}

.breadcrumb [aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- product detail (pdp) ---------- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(4rem, 8vw, 6rem);
}

.product .product-media {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
}

.product-details {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
}

.product-details h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.03;
  margin-bottom: 0.9rem;
  overflow-wrap: anywhere;
}

.product-details .product-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2rem;
}

.product-meta {
  border-top: 1px solid var(--line);
  margin-bottom: 2rem;
}

.product-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.product-meta dt {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.product-meta dd {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.product-note {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- editorial strip ---------- */
.editorial {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.editorial-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.editorial p {
  font-size: clamp(1.4rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 26ch;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line-strong);
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2.5rem;
}

.footer-brand .brand {
  font-size: 2.4rem;
}

.footer-brand p {
  margin-top: 0.75rem;
  color: var(--muted);
  max-width: 30ch;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

.footer-nav a {
  font-size: 0.9rem;
  font-weight: 600;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-legal {
  max-width: var(--maxw);
  margin: 2.5rem auto 0;
  padding: 1.25rem clamp(1rem, 3vw, 2rem) 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .product {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-details {
    position: static;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -22px rgba(18, 19, 15, 0.35);
    padding: 0.5rem clamp(1rem, 3vw, 2rem) 1.25rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav-list a {
    display: block;
    padding: 0.95rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
  }

  .site-nav-list a::after {
    display: none;
  }

  .site-nav-list li:last-child a {
    border-bottom: 0;
  }
}

@media (max-width: 560px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 0.75rem;
  }

  .category-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-title {
    font-size: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
