:root {
  --bg: #ffffff;
  --bg-subtle: #f5f5f7;
  --bg-footer: #f5f5f7;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --line: #d2d2d7;
  --line-soft: #e8e8ed;
  --blue: #0066cc;
  --blue-hover: #004499;
  --hero: #161618;
  --header-h: 56px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.011em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-weight: 600;
  margin: 0 0 0.55em;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
[hidden] { display: none !important; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  background: var(--text);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 1000;
}
.skip-link:focus { top: 12px; }
.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 {
  width: min(100% - 48px, var(--max));
  margin-inline: auto;
}

/* Header — light */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
  width: min(100% - 48px, var(--max));
  margin-inline: auto;
}
.logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
  line-height: 0;
}
.logo:hover { text-decoration: none; }
.logo img {
  display: block;
  height: 24px;
  width: auto;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav a {
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  opacity: 0.88;
}
.nav a:hover { opacity: 1; text-decoration: none; }
.nav a[aria-current="page"] { opacity: 1; font-weight: 600; }
.icon-link, .cart-link, .account-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--text);
  text-decoration: none;
}
.icon-link:hover, .cart-link:hover, .account-link:hover { text-decoration: none; }
.cart-badge {
  position: absolute;
  top: 1px;
  right: -1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--text);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.cart-badge.is-on { display: inline-flex; }
.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--text);
  margin: 4px 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 980px;
  padding: 12px 22px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.15s ease, opacity 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-light { background: #fff; color: var(--text); }
.btn-light:hover { background: #eee; color: var(--text); }
.btn-outline {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn-outline:hover { background: var(--bg-subtle); color: var(--text); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Hero — original structure, refined */
.hero {
  background: #000;
  padding: 0;
  margin: 0;
  line-height: 0;
}
.hero picture,
.hero img {
  display: block;
  width: 100%;
  height: auto;
}
.hero img {
  aspect-ratio: 2560 / 960;
}
@media (max-width: 767px) {
  .hero img {
    aspect-ratio: 1 / 1;
  }
}

/* Sections */
.section { padding: 72px 0; }
.section-head { margin-bottom: 28px; }
.section-head h2 { margin: 0; font-weight: 600; font-size: 1.5rem; }
.muted { color: var(--text-secondary); }
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 28px 20px;
}

.collection-card {
  display: block;
  background: var(--bg-subtle);
  border-radius: 22px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.collection-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  text-decoration: none;
}
.collection-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--bg-subtle);
  padding: 28px;
}
.collection-card figcaption {
  padding: 0 8px 22px;
  font-weight: 500;
  font-size: 17px;
}

.product-card {
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease;
}
.product-card:hover { transform: translateY(-3px); text-decoration: none; }
.product-card .thumb {
  background: var(--bg-subtle);
  border-radius: 20px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  margin-bottom: 14px;
  transition: background 0.22s ease;
}
.product-card:hover .thumb { background: #eeeef2; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-card h3 { font-size: 15px; margin: 0 0 6px; font-weight: 500; letter-spacing: -0.02em; }
.product-card .price { font-size: 15px; color: var(--text); font-weight: 400; }
.swatches { display: flex; gap: 6px; margin: 6px 0 8px; }
.swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
}

/* Product page */
.product-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  align-items: start;
  padding: 36px 0 88px;
}
.gallery-main {
  background: var(--bg-subtle);
  border-radius: 28px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow: hidden;
  min-height: min(72vh, 640px);
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.thumbs button {
  width: 78px;
  height: 78px;
  padding: 8px;
  border: 1px solid transparent;
  background: var(--bg-subtle);
  border-radius: 14px;
  cursor: pointer;
}
.thumbs button[aria-selected="true"] { border-color: var(--text); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.product-meta h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 14px;
}
.product-price {
  font-size: 21px;
  font-weight: 400;
  margin: 0 0 10px;
}
.product-import {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0 0 8px;
}
.product-total {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
}
.variant-label {
  font-size: 13px;
  font-weight: 500;
  margin: 16px 0 8px;
}
.variant-label span { font-weight: 400; color: var(--text-secondary); }
.color-options, .cap-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.color-option, .cap-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 980px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}
.color-option:hover, .cap-option:hover { text-decoration: none; border-color: var(--text-secondary); }
.color-option.is-active, .cap-option.is-active {
  border-color: var(--text);
  box-shadow: inset 0 0 0 1px var(--text);
  font-weight: 500;
}
.color-option i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
  display: block;
}
.sku { font-size: 13px; color: var(--text-secondary); margin: 16px 0; }
.qty-row { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.qty-box {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  width: max-content;
  flex: 0 0 auto;
}
.qty-box button {
  width: 36px;
  height: 36px;
  border: 0;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
  flex: 0 0 36px;
}
.qty-box input,
.qty-box input[type="text"] {
  width: 44px;
  max-width: 44px;
  flex: 0 0 44px;
  height: 36px;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 0;
  text-align: center;
  font: inherit;
  font-size: 15px;
  padding: 0;
  box-shadow: none;
}
.import-note {
  margin: 22px 0 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  white-space: pre-wrap;
}
.add-feedback {
  font-size: 14px;
  color: #248a3d;
  margin-top: 10px;
  min-height: 1.2em;
}

/* Cart */
.cart-layout {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  gap: 48px;
  align-items: start;
  padding: 8px 0 80px;
}
.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 40px 0 8px;
}
.cart-head h1 { margin: 0; }
.cart-cols {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.cart-row {
  display: grid;
  grid-template-columns: 88px 1fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
}
.cart-row img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  background: var(--bg-subtle);
  border-radius: 14px;
  padding: 6px;
}
.cart-row h3 { font-size: 16px; margin: 0 0 4px; font-weight: 500; }
.cart-row .meta { font-size: 14px; color: var(--text-secondary); }
.cart-row .line-total { font-weight: 500; min-width: 7rem; text-align: right; }
.icon-btn {
  background: none;
  border: 0;
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  padding: 0;
}
.icon-btn:hover { color: #b3261e; }
.cart-empty {
  text-align: center;
  padding: 80px 20px 96px;
}
.cart-empty h1 { margin-bottom: 24px; }
.cart-empty .account-prompt { margin-top: 40px; color: var(--text); }
.cart-empty .account-prompt p { margin: 0 0 6px; }
.summary {
  background: var(--bg-subtle);
  border-radius: 20px;
  padding: 24px;
  position: sticky;
  top: calc(var(--header-h) + 24px);
}
.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 17px;
  margin: 0 0 12px;
  font-weight: 500;
}
.summary .hint { font-size: 13px; color: var(--text-secondary); margin: 0 0 20px; line-height: 1.45; }
.checkout-panel { margin-top: 16px; }
.checkout-panel h3 { font-size: 16px; margin: 16px 0 10px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 12px; }

/* Forms */
.form { display: grid; gap: 14px; max-width: 640px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  background: #fff;
  color: var(--text);
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}
textarea { min-height: 140px; resize: vertical; }
.form-error { color: #b3261e; font-size: 14px; min-height: 1.2em; }
.form-ok { color: #248a3d; font-size: 14px; }

.prose { max-width: 44rem; }
.prose h1 { margin-bottom: 24px; }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin: 0.3em 0; }
.page-hero { padding: 48px 0 8px; }

.orders-list { margin-top: 36px; }
.order-card {
  border-top: 1px solid var(--line-soft);
  padding: 16px 0;
  font-size: 15px;
}
.order-card .meta { color: var(--text-secondary); font-size: 13px; }

/* Footer — light */
.site-footer {
  margin-top: auto;
  background: var(--bg-footer);
  color: var(--text);
  padding: 56px 0 24px;
  border-top: 1px solid var(--line-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 36px;
}
.site-footer h3 {
  font-size: 14px;
  letter-spacing: 0;
  margin-bottom: 14px;
}
.site-footer a { color: var(--text-secondary); font-size: 14px; }
.site-footer a:hover { color: var(--text); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 8px; }
.site-footer .addr, .site-footer .contact-block {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}
.legal-bar {
  border-top: 1px solid var(--line-soft);
  padding-top: 18px;
  font-size: 12px;
  color: var(--text-tertiary);
}

@media (max-width: 880px) {
  .grid-2, .product-layout, .cart-layout, .footer-grid, .form-row, .cart-row, .cart-cols {
    grid-template-columns: 1fr;
  }
  .cart-row .line-total { text-align: left; }
  .gallery-main { min-height: 0; }
  .section { padding: 48px 0; }
  .menu-toggle { display: inline-block; }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line-soft);
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 24px 18px;
    gap: 14px;
    margin: 0;
  }
  .nav.is-open { display: flex; }
  .site-header { position: sticky; }
  .site-header .inner { position: relative; width: min(100% - 32px, var(--max)); }
  .wrap { width: min(100% - 32px, var(--max)); }
  .header-right { gap: 8px; }
}
