:root {
  --bg: #f7f3ef;
  --ink: #19182f;
  --muted: #6f6670;
  --line: #e2d6cf;
  --panel: #ffffff;
  --navy: #242348;
  --brown: #6f514c;
  --copper: #bd7446;
  --sand: #d8b397;
  --green: #6f514c;
  --green-dark: #242348;
  --gold: #bd7446;
  --red: #a83224;
  --shadow: 0 18px 50px rgba(36, 35, 72, 0.13);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #fffaf6 0, var(--bg) 420px),
    var(--bg);
  font-family: Inter, Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 14px clamp(18px, 5vw, 64px);
  border-bottom: 1px solid rgba(226, 214, 207, 0.86);
  background: rgba(255, 250, 246, 0.92);
  backdrop-filter: blur(14px);
}

.brand,
nav a,
.primary-link,
.product-link,
.back-link {
  color: inherit;
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand img {
  width: clamp(112px, 14vw, 156px);
  height: auto;
  display: block;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 800;
}

nav a {
  position: relative;
  padding: 8px 0;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: right;
  background: var(--copper);
  transition: transform 180ms ease;
}

nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero {
  min-height: min(760px, calc(100vh - 72px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.62fr);
  align-items: center;
  gap: clamp(24px, 5vw, 68px);
  padding: clamp(32px, 6vw, 72px);
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 20%, rgba(216, 179, 151, 0.55), transparent 34%),
    linear-gradient(135deg, #fffaf6 0%, #f3e4dc 54%, #e7d2c4 100%);
}

.hero-copy {
  max-width: 720px;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 7.7rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 620px;
  color: #51484f;
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.55;
}

.hero-feature {
  justify-self: end;
  width: min(440px, 100%);
  min-height: 360px;
  display: grid;
  align-content: end;
  gap: 10px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(36, 35, 72, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(155deg, rgba(36, 35, 72, 0.08), rgba(189, 116, 70, 0.23)),
    linear-gradient(180deg, rgba(255, 250, 246, 0.38), rgba(216, 179, 151, 0.7));
  box-shadow: var(--shadow);
}

.hero-feature span {
  color: var(--copper);
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 900;
}

.hero-feature strong {
  max-width: 280px;
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.98;
}

.hero-feature small {
  color: #5b5158;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 900;
}

.primary-link,
.buy-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 900;
}

.primary-link,
.buy-button {
  border: 0;
  color: #fff;
  background: var(--navy);
  box-shadow: 0 10px 24px rgba(36, 35, 72, 0.18);
}

.primary-link:hover,
.buy-button:hover {
  background: var(--copper);
}

.ghost-button {
  border: 1px solid var(--line);
  color: var(--navy);
  background: #fff;
}

.catalog-section,
.quality-section {
  padding: clamp(32px, 6vw, 72px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-heading h2,
.quality-section h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: 0;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px);
  gap: 14px;
  margin-bottom: 24px;
}

label {
  display: grid;
  gap: 7px;
  color: #37423e;
  font-size: 0.88rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input[type="radio"] {
  width: auto;
  min-height: auto;
  accent-color: var(--copper);
}

input:focus,
select:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(189, 116, 70, 0.15);
}

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

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 58px rgba(36, 35, 72, 0.17);
}

.product-link {
  display: block;
  height: 100%;
}

.product-card button {
  width: 100%;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #e7e4dc;
}

.product-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.badge {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: var(--copper);
  font-size: 0.76rem;
  font-weight: 900;
}

.product-info {
  display: grid;
  gap: 8px;
  padding: 15px;
}

.product-info h3 {
  margin: 0;
  font-size: 1.05rem;
}

.product-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.product-cta,
.back-link {
  color: var(--copper);
  font-weight: 900;
}

.product-cta {
  margin-top: 4px;
}

.price-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-line strong {
  font-size: 1.25rem;
  color: var(--navy);
}

.price-line del {
  color: #8d938f;
  font-size: 0.88rem;
}

.sizes {
  color: #3c4944;
  font-size: 0.86rem;
  font-weight: 800;
}

.quality-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  background: var(--navy);
  color: #f9fbfa;
}

.quality-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
}

.quality-grid article {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.quality-grid span {
  color: #b8c7c2;
  line-height: 1.5;
}

.empty-state {
  display: none;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
}

.product-page {
  min-height: calc(100vh - 72px);
  padding: clamp(22px, 5vw, 64px);
}

.product-page-empty {
  display: grid;
  place-items: center;
  min-height: 360px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 900;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
}

.product-gallery {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  position: sticky;
  top: 94px;
}

.thumbs {
  display: grid;
  gap: 8px;
  align-content: start;
}

.thumbs button {
  width: 92px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0;
  background: #fff;
}

.thumbs button.active {
  border-color: var(--copper);
}

.thumbs img,
.main-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.main-photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 8px;
  background: #e7e4dc;
  box-shadow: var(--shadow);
}

.product-buy-panel {
  display: grid;
  gap: 16px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 28px);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.product-buy-panel h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.product-buy-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.product-price strong {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.checkout-box {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.checkout-form,
.shipping-panel,
.shipping-options,
.unit-size-list {
  display: grid;
  gap: 12px;
}

.unit-size-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf6;
}

.checkout-grid,
.address-grid {
  display: grid;
  gap: 10px;
}

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

.address-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(90px, 0.55fr);
}

.address-grid label:nth-child(3),
.address-grid label:nth-child(4),
.address-grid label:nth-child(5) {
  grid-column: span 1;
}

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

.radio-label,
.shipping-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fffaf6;
}

.shipping-option span {
  display: grid;
  gap: 4px;
}

.shipping-option small,
.pickup-note {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.pickup-note {
  padding: 10px 12px;
  border: 1px solid #ead5c4;
  border-radius: 8px;
  background: #fff6ee;
}

.checkout-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.checkout-total span {
  color: var(--muted);
  font-weight: 900;
}

.checkout-total strong {
  font-size: 1.45rem;
  color: var(--navy);
}

@media (max-width: 820px) {
  .site-header,
  .section-heading,
  .quality-section {
    align-items: stretch;
    flex-direction: column;
  }

  .site-header,
  .section-heading {
    display: flex;
  }

  nav {
    flex-wrap: wrap;
  }

  .filters,
  .hero,
  .quality-section,
  .quality-grid,
  .product-detail,
  .product-gallery,
  .checkout-grid,
  .address-grid,
  .delivery-choice,
  .unit-size-list {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-feature {
    justify-self: stretch;
    min-height: 220px;
  }

  .product-gallery {
    position: static;
  }

  .thumbs {
    display: flex;
    overflow-x: auto;
  }
}
