/* =========================================================================
   On — native HTML storefront theme
   Swiss editorial athletic. Clean grid, hairline rules, one signal accent.
   ========================================================================= */

:root {
  --header-h: 72px;

  --ink: #111110;
  --ink-soft: #3d3d39;
  --muted: #75756f;
  --faint: #a6a6a0;

  --paper: #fafaf8;
  --panel: #ffffff;
  --line: #e7e7e2;
  --line-strong: #d6d6d0;

  --accent: #ff3d00;
  --accent-ink: #c72f00;

  --radius: 2px;

  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1360px;

  --font-sans: "Helvetica Neue", "Neue Haas Grotesk", Helvetica, Arial,
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.21, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

[hidden] {
  display: none !important;
}

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

a {
  color: inherit;
}

::selection {
  background: var(--accent);
  color: #fff;
}

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

.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;
}

.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(250, 250, 248, 0.9);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--ink);
}

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

.nav-toggle {
  display: none;
}

.site-nav {
  display: flex;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu a {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink-soft);
}

.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

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

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

/* ------------------------------------------------------------------- intro */

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 2px;
  margin-right: 12px;
  vertical-align: middle;
  background: var(--accent);
}

.display {
  margin: 0;
  font-size: clamp(2.6rem, 7.5vw, 6.25rem);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.045em;
  max-width: 11ch;
}

.display .accent {
  color: var(--accent);
}

.intro-copy {
  margin: 0 0 28px;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink-soft);
}

.intro-side .eyebrow {
  margin-bottom: 14px;
}

/* ---------------------------------------------------------------------- cta */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.cta .arrow {
  transition: transform 0.2s var(--ease);
}

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

.cta:hover .arrow {
  transform: translateX(4px);
}

/* ------------------------------------------------------------------- shelf */

.shelf {
  padding: clamp(48px, 7vw, 88px) 0;
}

.shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(24px, 3vw, 40px);
}

.shelf-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.shelf-head .count {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------------- grid */

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px) clamp(16px, 2.6vw, 30px);
}

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

.product-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

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

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

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

.product-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  text-transform: lowercase;
  color: var(--accent);
}

.product-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 2px 0;
}

.product-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.product-link:hover .product-title,
.product-link:focus-visible .product-title {
  color: var(--accent-ink);
}

.product-price {
  margin: 0;
  flex: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(32px, 5vw, 56px);
}

.load-more {
  min-width: 180px;
  height: 48px;
  padding: 0 28px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.load-more:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* ------------------------------------------------------------ collections */

.collections {
  padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px);
}

.collection-index {
  margin: 0;
  padding: 0;
  list-style: none;
}

.collection-index li {
  border-top: 1px solid var(--line);
}

.collection-index li:last-child {
  border-bottom: 1px solid var(--line);
}

.collection-index a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(18px, 3vw, 28px) 4px;
  font-size: clamp(1.3rem, 3.6vw, 2.4rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
  transition: padding-left 0.25s var(--ease), color 0.25s var(--ease);
}

.collection-index .arrow {
  font-size: 0.7em;
  color: var(--faint);
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}

.collection-index a:hover {
  color: var(--accent);
  padding-left: 16px;
}

.collection-index a:hover .arrow {
  color: var(--accent);
  transform: translateX(6px);
}

/* ------------------------------------------------------------- collection */

.page-head {
  padding: clamp(48px, 7vw, 88px) 0 clamp(28px, 4vw, 40px);
}

.page-head h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6.5vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.page-head .lede {
  margin: 18px 0 0;
  max-width: 56ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.page-head .result-count {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------------- toolbar */

.toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 60;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.toolbar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.search {
  flex: 1 1 auto;
  max-width: 360px;
}

.search-input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease);
}

.search-input::placeholder {
  color: var(--faint);
}

.search-input:focus {
  outline: none;
  border-color: var(--ink);
}

.sort {
  flex: none;
}

.sort-select {
  height: 44px;
  padding: 0 40px 0 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
}

.sort-select:focus {
  outline: none;
  border-color: var(--ink);
}

/* -------------------------------------------------------------- pagination */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: clamp(40px, 6vw, 64px);
}

.pagination button {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

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

.pagination button:disabled {
  color: var(--faint);
  border-color: var(--line);
  cursor: default;
}

.pagination button[aria-current="page"] {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.pagination-ellipsis {
  padding: 0 4px;
  color: var(--faint);
}

/* ----------------------------------------------------------------- empty */

.empty-state {
  padding: 64px 0;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

/* --------------------------------------------------------------------- pdp */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 0;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumb a {
  text-decoration: none;
  color: var(--muted);
}

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

.breadcrumb .sep {
  color: var(--faint);
}

.pdp {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  padding: 8px 0 clamp(56px, 8vw, 96px);
}

.pdp-media {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.pdp-media .product-fallback {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f0f0ec;
  border-radius: var(--radius);
}

.pdp-media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: #f0f0ec;
}

.pdp-info h1 {
  margin: 0 0 18px;
  font-size: clamp(1.9rem, 4.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.03;
}

.pdp-price {
  margin: 0 0 28px;
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.pdp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  margin-bottom: 40px;
}

.pdp-sku {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-mono);
}

.pdp-details {
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.pdp-details h2 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pdp-details p {
  margin: 0 0 22px;
  max-width: 48ch;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.spec-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.spec-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.spec-list .k {
  color: var(--muted);
}

.spec-list .v {
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  margin-top: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--line);
  padding: clamp(48px, 7vw, 80px) 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.footer-brand {
  font-size: clamp(3rem, 11vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.85;
  text-transform: lowercase;
  color: var(--ink);
}

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

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

.footer-nav li {
  border-top: 1px solid var(--line);
}

.footer-nav a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 2px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}

.footer-nav a:hover {
  color: var(--accent);
  padding-left: 10px;
}

.footer-note {
  margin: clamp(32px, 5vw, 56px) 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------- responsive */

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

@media (max-width: 720px) {
  .intro {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .pdp {
    grid-template-columns: 1fr;
  }

  .pdp-media {
    position: static;
  }

  /* --- collapsed navigation --- */
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 11px;
    background: transparent;
    border: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-toggle .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 1px;
    transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 8px var(--gutter) 28px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

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

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

  .nav-menu li {
    border-bottom: 1px solid var(--line);
  }

  .nav-menu a {
    display: block;
    padding: 17px 2px;
    font-size: 19px;
    font-weight: 650;
    letter-spacing: -0.01em;
  }

  .nav-menu a::after {
    display: none;
  }

  .site-header.nav-open .nav-toggle .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header.nav-open .nav-toggle .bar:nth-child(2) {
    opacity: 0;
  }

  .site-header.nav-open .nav-toggle .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

@media (max-width: 460px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .toolbar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .search {
    max-width: none;
  }

  .sort-select {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
