:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #64615c;
  --paper: #f8f6f1;
  --surface: #ffffff;
  --line: #ded9ce;
  --teal: #226963;
  --teal-dark: #143f3c;
  --clay: #b76851;
  --sage: #dfeae4;
  --charcoal: #242629;
  --shadow: 0 18px 50px rgba(23, 23, 23, 0.14);
  --radius: 8px;
  --header-height: 78px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  min-width: 320px;
}

body.is-locked {
  overflow: hidden;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.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-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-height);
  display: grid;
  grid-template-columns: auto 1fr minmax(240px, 360px) auto;
  align-items: center;
  gap: 22px;
  padding: 0 32px;
  background: rgba(248, 246, 241, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(222, 217, 206, 0.82);
}

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

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

.brand-name {
  font-size: 1.06rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

.main-nav a {
  padding: 8px 0;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--ink);
}

.search-form {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px;
}

.search-form input {
  min-width: 0;
  height: 38px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 12px;
  color: var(--ink);
}

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.cart-trigger {
  position: relative;
  width: 56px;
  font-size: 0.75rem;
  font-weight: 800;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--clay);
  color: #fff;
  font-size: 0.75rem;
  border: 2px solid var(--paper);
}

.nav-toggle {
  display: none;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  content: "";
}

.nav-toggle span {
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.hero {
  position: relative;
  min-height: 680px;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--charcoal);
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.74) 0%, rgba(10, 10, 10, 0.42) 42%, rgba(10, 10, 10, 0.08) 100%),
    linear-gradient(0deg, rgba(10, 10, 10, 0.78) 0%, rgba(10, 10, 10, 0) 36%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 48px));
  padding: 0 0 156px 6vw;
  color: #fff;
}

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

.hero .eyebrow {
  color: #f0c2a8;
}

.hero h1,
.section-heading h2,
.collection-copy h2,
.newsletter h2 {
  margin: 0;
  line-height: 0.98;
  font-weight: 850;
}

.hero h1 {
  font-size: 4.7rem;
}

.hero-copy {
  max-width: 560px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.18rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--teal);
  color: #fff;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--teal-dark);
}

.button-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.08);
}

.button-small {
  min-height: 38px;
  padding: 0 16px;
  background: var(--ink);
  color: #fff;
}

.button-outline {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button-full {
  width: 100%;
}

.hero-strip {
  position: absolute;
  z-index: 2;
  left: 6vw;
  right: 6vw;
  bottom: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 760px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
}

.hero-strip div {
  padding: 18px;
  background: rgba(23, 23, 23, 0.38);
}

.hero-strip dt {
  color: #fff;
  font-size: 1.45rem;
  font-weight: 850;
}

.hero-strip dd {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.74);
}

.catalog-head,
.shop-layout,
.collection-band,
.benefits,
.newsletter,
.footer {
  width: min(1220px, calc(100% - 48px));
  margin-inline: auto;
}

.catalog-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 76px 0 28px;
}

.section-heading {
  max-width: 680px;
}

.section-heading h2,
.collection-copy h2,
.newsletter h2 {
  font-size: 2.7rem;
}

.section-heading p:not(.eyebrow),
.collection-copy p:not(.eyebrow) {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.catalog-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.select-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.select-field select {
  min-width: 170px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
}

.shop-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  align-items: start;
  gap: 34px;
  padding-bottom: 78px;
}

.filters {
  position: sticky;
  top: calc(var(--header-height) + 22px);
  display: grid;
  gap: 28px;
  padding: 6px 0;
}

.filter-group h3 {
  margin: 0 0 14px;
  font-size: 0.94rem;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.range-field {
  display: grid;
  gap: 12px;
}

.range-field span {
  color: var(--muted);
  font-weight: 800;
}

.range-field input {
  width: 100%;
  accent-color: var(--teal);
}

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

.check-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.products-area {
  min-width: 0;
}

.results-bar {
  min-height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.results-bar p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 800;
}

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

.product-card {
  display: grid;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(23, 23, 23, 0.04);
}

.product-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background-color: #f1eee8;
  background-image: url("../img/product-sheet.png");
  background-repeat: no-repeat;
  background-size: 400% 200%;
  overflow: hidden;
}

.product-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 23, 23, 0) 68%, rgba(23, 23, 23, 0.14) 100%);
  pointer-events: none;
}

.product-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1;
  max-width: calc(100% - 24px);
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.product-info {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.product-category {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.product-card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.28;
}

.save-button {
  min-width: 48px;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.save-button.is-active {
  background: var(--sage);
  color: var(--teal-dark);
  border-color: var(--sage);
}

.swatches {
  display: flex;
  gap: 7px;
  min-height: 16px;
}

.swatch {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(23, 23, 23, 0.22);
  background: var(--swatch);
}

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

.price-stack {
  display: grid;
  gap: 2px;
}

.price-stack strong {
  font-size: 1.04rem;
}

.price-stack span {
  min-height: 1em;
  color: var(--muted);
  font-size: 0.84rem;
  text-decoration: line-through;
}

.empty-state {
  margin: 42px 0;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.collection-band {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 34px;
  align-items: stretch;
  padding: 58px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.lookbook-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.lookbook-grid article {
  min-height: 220px;
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 22px;
  background: var(--surface);
}

.lookbook-grid span {
  color: var(--clay);
  font-weight: 900;
}

.lookbook-grid h3 {
  margin: 0;
  font-size: 1.2rem;
}

.lookbook-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 64px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.benefits article {
  min-height: 130px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 24px;
  background: var(--surface);
}

.benefits strong {
  font-size: 1rem;
}

.benefits span {
  color: var(--muted);
  line-height: 1.55;
}

.newsletter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 28px;
  align-items: end;
  padding: 72px 0;
}

.newsletter form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.newsletter input {
  min-width: 0;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0 14px;
}

.form-note {
  grid-column: 2;
  margin: 0;
  min-height: 1.2em;
  color: var(--teal);
  font-weight: 800;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer span:first-child {
  color: var(--ink);
  font-weight: 900;
}

.drawer,
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.drawer.is-open,
.modal.is-open {
  pointer-events: auto;
  opacity: 1;
}

.drawer-backdrop,
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 23, 23, 0.48);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(440px, 100%);
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--surface);
  transform: translateX(100%);
  transition: transform 220ms ease;
}

.drawer.is-open .drawer-panel {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2 {
  margin: 0;
}

.cart-items {
  overflow: auto;
  padding: 8px 24px;
}

.cart-line {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.cart-thumb {
  width: 74px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background-color: #f1eee8;
  background-image: url("../img/product-sheet.png");
  background-repeat: no-repeat;
  background-size: 400% 200%;
}

.cart-line h3 {
  margin: 0 0 4px;
  font-size: 0.96rem;
}

.cart-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.cart-line-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.qty-control {
  display: inline-grid;
  grid-template-columns: 34px 34px 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.qty-control button {
  height: 34px;
  border: 0;
  background: var(--surface);
}

.qty-control span {
  text-align: center;
  font-weight: 900;
}

.remove-line {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.cart-summary {
  display: grid;
  gap: 12px;
  padding: 22px 24px 24px;
  border-top: 1px solid var(--line);
}

.cart-summary div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
}

.cart-summary strong {
  color: var(--ink);
}

.cart-total {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 1.12rem;
}

.modal {
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-panel {
  position: relative;
  width: min(940px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateY(12px);
  transition: transform 180ms ease;
}

.modal.is-open .modal-panel {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
}

.modal-product {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(280px, 1fr);
  gap: 28px;
  padding: 24px;
}

.modal-media {
  min-height: 560px;
  border-radius: var(--radius);
  background-color: #f1eee8;
  background-image: url("../img/product-sheet.png");
  background-repeat: no-repeat;
  background-size: 400% 200%;
}

.modal-info {
  display: grid;
  align-content: start;
  gap: 20px;
  padding: 18px 10px 18px 0;
}

.modal-info h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.08;
}

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

.modal-price {
  font-size: 1.45rem;
}

.option-group {
  display: grid;
  gap: 10px;
}

.option-group strong {
  font-size: 0.9rem;
}

.size-options,
.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.size-option,
.color-option {
  min-width: 44px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 850;
}

.size-option[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.color-option {
  width: 42px;
  min-width: 42px;
  border-radius: 999px;
  background: var(--swatch);
}

.color-option[aria-pressed="true"] {
  outline: 3px solid var(--sage);
  outline-offset: 2px;
  border-color: var(--ink);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  min-width: min(360px, calc(100% - 48px));
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  text-align: center;
  font-weight: 800;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

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

  .nav-toggle {
    display: inline-grid;
  }

  .main-nav {
    position: absolute;
    left: 24px;
    right: 24px;
    top: calc(var(--header-height) - 8px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

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

  .main-nav a {
    padding: 13px 10px;
  }

  .search-form {
    min-width: 0;
  }

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

  .collection-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 70px;
  }

  .topbar {
    grid-template-columns: auto auto auto;
    gap: 10px;
    padding: 0 16px;
  }

  .brand-name {
    display: none;
  }

  .search-form {
    grid-column: 1 / -1;
    order: 4;
    width: 100%;
    margin-bottom: 10px;
  }

  .topbar {
    height: auto;
    min-height: var(--header-height);
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    width: min(100%, calc(100% - 32px));
    padding: 0 0 178px 20px;
  }

  .hero h1 {
    font-size: 3.2rem;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .hero-strip {
    left: 16px;
    right: 16px;
    grid-template-columns: 1fr;
  }

  .hero-strip div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
  }

  .catalog-head,
  .shop-layout,
  .collection-band,
  .benefits,
  .newsletter,
  .footer {
    width: min(100% - 32px, 1220px);
  }

  .catalog-head {
    display: grid;
    padding-top: 54px;
  }

  .section-heading h2,
  .collection-copy h2,
  .newsletter h2 {
    font-size: 2rem;
  }

  .shop-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .filters {
    position: static;
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
  }

  .product-grid,
  .lookbook-grid,
  .benefits,
  .newsletter {
    grid-template-columns: 1fr;
  }

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

  .form-note {
    grid-column: 1;
  }

  .footer {
    display: grid;
  }

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

  .modal-media {
    min-height: 380px;
  }
}

@media (max-width: 520px) {
  .hero h1 {
    font-size: 2.55rem;
  }

  .hero-actions,
  .product-foot,
  .results-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .product-grid {
    gap: 14px;
  }

  .cart-line {
    grid-template-columns: 62px 1fr;
  }

  .cart-thumb {
    width: 62px;
  }

  .modal {
    padding: 10px;
  }

  .modal-product {
    padding: 14px;
  }
}
