:root {
  --ink: #171717;
  --muted: #68645f;
  --line: #ddd8d0;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --clay: #a84f35;
  --sage: #6e7d63;
  --steel: #52606d;
  --gold: #d6a34a;
  --shadow: 0 18px 50px rgba(23, 23, 23, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr minmax(210px, 340px) auto auto;
  gap: 18px;
  align-items: center;
  min-height: 74px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(221, 216, 208, 0.8);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  font-size: 0.86rem;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 26px);
  color: var(--muted);
  font-weight: 650;
  font-size: 0.94rem;
}

.main-nav a.is-active { color: var(--ink); }

.search-form {
  display: grid;
  grid-template-columns: 1fr 40px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.search-form input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 11px 0 11px 16px;
}

.search-form button,
.cart-link {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.search-form svg,
.cart-link svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-link {
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

#cart-count {
  position: absolute;
  top: -5px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--clay);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.menu-button { display: none; }

.page {
  display: none;
  padding: clamp(24px, 5vw, 64px) clamp(18px, 4vw, 56px);
}

.page.is-active { display: block; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: stretch;
  min-height: min(680px, calc(100vh - 118px));
  padding: clamp(30px, 5vw, 72px);
  background: #efebe3;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.hero-copy {
  align-self: center;
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1, h2, p { margin-top: 0; }

.hero h1 {
  margin-bottom: 18px;
  font-size: clamp(3rem, 8vw, 7.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  color: #4d4944;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.7;
}

.hero-actions,
.purchase-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.button.primary,
.button.dark {
  background: var(--ink);
  color: #fff;
}

.button.secondary {
  background: transparent;
  color: var(--ink);
}

.button.full { width: 100%; }

.hero-visual {
  position: relative;
  min-height: 420px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.66) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(0deg, rgba(255,255,255,0.66) 1px, transparent 1px) 0 0 / 44px 44px,
    #d9d3c8;
  box-shadow: inset 0 0 0 1px rgba(23, 23, 23, 0.06);
}

.hero-card {
  position: absolute;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-card.jacket {
  left: 12%;
  top: 14%;
  width: 42%;
  height: 58%;
  background: linear-gradient(145deg, #202123 0 56%, #52606d 56% 100%);
}

.hero-card.tee {
  right: 10%;
  top: 22%;
  width: 36%;
  height: 42%;
  background: linear-gradient(145deg, #fff 0 62%, #d6a34a 62% 100%);
}

.hero-card.cap {
  left: 42%;
  bottom: 11%;
  width: 33%;
  height: 24%;
  background: linear-gradient(145deg, var(--sage) 0 62%, #2e342b 62% 100%);
}

.section {
  margin-top: clamp(44px, 7vw, 84px);
}

.section-heading,
.page-title {
  max-width: 760px;
  margin-bottom: 22px;
}

.section-heading h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.product-art {
  position: relative;
  min-height: 260px;
  background: #e9e4da;
  overflow: hidden;
}

.product-art::before,
.product-art::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 8px;
}

.art-jacket::before { left: 27%; top: 17%; width: 46%; height: 62%; background: var(--steel); }
.art-jacket::after { left: 36%; top: 8%; width: 28%; height: 18%; background: #252525; }
.art-hoodie::before { left: 24%; top: 16%; width: 52%; height: 66%; background: var(--clay); }
.art-hoodie::after { left: 35%; top: 7%; width: 30%; height: 22%; background: #8e3f2d; border-radius: 50% 50% 8px 8px; }
.art-pants::before { left: 30%; top: 14%; width: 16%; height: 70%; background: #2f363c; }
.art-pants::after { right: 30%; top: 14%; width: 16%; height: 70%; background: #52606d; }
.art-bag::before { left: 28%; top: 30%; width: 44%; height: 36%; background: var(--gold); }
.art-bag::after { left: 35%; top: 20%; width: 30%; height: 28%; border: 10px solid #4c4434; background: transparent; }
.art-cap::before { left: 28%; top: 39%; width: 44%; height: 22%; background: var(--sage); border-radius: 100px 100px 8px 8px; }
.art-cap::after { right: 18%; top: 48%; width: 28%; height: 9%; background: #30372f; border-radius: 999px; }
.art-sneaker::before { left: 20%; top: 44%; width: 58%; height: 20%; background: #f8f6ef; }
.art-sneaker::after { right: 15%; top: 53%; width: 48%; height: 11%; background: #171717; }

.product-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.product-card h3 {
  margin: 0;
  font-size: 1rem;
}

.price { color: var(--muted); font-weight: 800; white-space: nowrap; }

.shop-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.sort-control select,
.quantity-picker button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.chip {
  padding: 0 16px;
  font-weight: 800;
}

.chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.sort-control {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-weight: 700;
}

.sort-control select { padding: 0 12px; }

.promo {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: center;
  margin-top: clamp(44px, 7vw, 84px);
  padding: clamp(26px, 5vw, 54px);
  background: var(--sage);
  color: #fff;
  border-radius: 8px;
}

.promo .eyebrow,
.promo p { color: #f2efe8; }

.promo h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.detail-layout,
.cart-layout,
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.75fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.gallery-main {
  min-height: 580px;
  display: grid;
  place-items: end start;
  padding: 22px;
}

.gallery-main span {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-weight: 800;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.gallery-thumbs button {
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.gallery-thumbs .is-selected { border-color: var(--ink); }

.product-info {
  padding: clamp(20px, 4vw, 38px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-info h1 {
  margin-bottom: 12px;
  font-size: clamp(2.1rem, 5vw, 4.5rem);
  line-height: 1;
}

.detail-price {
  font-size: 1.35rem;
  font-weight: 900;
}

.detail-copy {
  color: var(--muted);
  line-height: 1.7;
}

.size-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 24px 0;
  padding: 0;
  border: 0;
}

.size-selector legend {
  flex-basis: 100%;
  margin-bottom: 2px;
  font-weight: 800;
}

.size-selector input { display: none; }

.size-selector span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.size-selector input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.quantity-picker {
  display: inline-grid;
  grid-template-columns: 42px 44px 42px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.quantity-picker button {
  border: 0;
  border-radius: 0;
}

.quantity-picker span {
  text-align: center;
  font-weight: 800;
}

.tabs { margin-top: 28px; }

.tab-list {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.tab {
  padding: 12px 10px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.tab.is-active { border-color: var(--clay); }

.tab-panel {
  display: none;
  padding-top: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.tab-panel.is-active { display: block; }

.cart-items {
  display: grid;
  gap: 12px;
}

.cart-item,
.summary-row {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-item .product-art {
  min-height: 86px;
  border-radius: 8px;
}

.cart-item h3,
.summary-row h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.cart-item p,
.summary-row p { margin: 0; color: var(--muted); }

.cart-summary {
  position: sticky;
  top: 96px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-summary h2,
.checkout-form h2 { margin-bottom: 18px; }

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.summary-line.total {
  font-size: 1.2rem;
  font-weight: 900;
}

.empty-cart {
  padding: 26px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.checkout-form {
  display: grid;
  gap: 22px;
}

.checkout-form section {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.form-grid .wide { grid-column: 1 / -1; }

.form-grid input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}

.payment-placeholder {
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(18px, 4vw, 56px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 1000px) {
  .site-header {
    grid-template-columns: auto 1fr auto auto;
  }

  .main-nav {
    position: fixed;
    inset: 74px 18px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open { display: flex; }

  .menu-button {
    display: grid;
    gap: 4px;
    width: 44px;
    height: 44px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .menu-button span {
    height: 2px;
    background: var(--ink);
  }

  .hero,
  .detail-layout,
  .cart-layout,
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cart-summary { position: static; }
}

@media (max-width: 680px) {
  .site-header {
    grid-template-columns: 1fr auto auto;
    gap: 10px;
  }

  .search-form {
    grid-column: 1 / -1;
    order: 5;
  }

  .brand span:last-child { display: none; }

  .hero {
    padding: 24px;
    min-height: auto;
  }

  .hero-visual,
  .gallery-main { min-height: 360px; }

  .product-grid,
  .form-grid { grid-template-columns: 1fr; }

  .shop-toolbar,
  .promo,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .sort-control {
    justify-content: space-between;
  }

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

  .cart-item,
  .summary-row {
    grid-template-columns: 72px 1fr;
  }

  .cart-item .price {
    grid-column: 2;
  }
}
