:root {
  --ink: #0d0d0d;
  --muted: #6f6a64;
  --line: #e8e3dc;
  --paper: #fbfaf8;
  --soft: #f1eee9;
  --accent: #8f1f1b;
  --gold: #b69b65;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 0 28px;
  background: rgba(251, 250, 248, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0;
  font-size: 15px;
  line-height: 1;
}

.brand::before {
  content: "MSP";
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
}

.brand::after {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  font-size: 13px;
  text-transform: uppercase;
}

.nav-links a {
  border-bottom: 1px solid transparent;
  padding: 24px 0 21px;
}

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

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.icon-button:hover {
  background: var(--soft);
}

.icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-count {
  position: absolute;
  right: 3px;
  top: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  font-size: 10px;
  line-height: 17px;
  text-align: center;
}

.menu-toggle {
  display: none;
}

.search-panel {
  display: none;
  position: sticky;
  top: 68px;
  z-index: 18;
  padding: 22px 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.search-panel.open {
  display: block;
}

.search-panel label {
  display: block;
  max-width: var(--max);
  margin: 0 auto 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.search-row {
  display: flex;
  max-width: var(--max);
  margin: 0 auto;
  gap: 10px;
}

.search-row input,
.panel-form input,
.panel-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 14px 15px;
  outline: none;
}

.search-row input:focus,
.panel-form input:focus,
.panel-form textarea:focus {
  border-color: var(--ink);
}

.button,
.add-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover,
.add-cart:hover {
  transform: translateY(-1px);
}

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

.button.light {
  color: var(--ink);
  background: #fff;
}

.button.wide {
  width: 100%;
}

.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  display: grid;
  align-items: end;
  background: var(--ink);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.08) 58%, rgba(0, 0, 0, 0.34));
}

.hero img {
  position: absolute;
  inset: 0;
  opacity: 0.86;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 0 28px 11vh;
  color: #fff;
}

.hero-copy p,
.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.collection-hero h1,
.product-panel h1,
.form-page h1,
.story h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 680px;
  margin-bottom: 28px;
  font-size: clamp(46px, 7vw, 96px);
  line-height: 0.95;
}

.section,
.shop-layout,
.cart-layout,
.product-detail,
.form-page,
.story,
.values {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 28px;
}

.split-feature {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 52px;
  align-items: end;
}

.split-feature h2,
.section-head h2,
.editorial h2,
.filter-panel h2,
.summary h2,
.values h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 400;
  line-height: 1.02;
}

.split-feature p:last-child,
.editorial p,
.page-hero p,
.collection-hero p,
.story p,
.values p,
.form-page p,
.detail-notes {
  color: var(--muted);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.category-card {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: var(--ink);
}

.category-card img {
  opacity: 0.88;
  transition: transform 450ms ease, opacity 450ms ease;
}

.category-card:hover img {
  transform: scale(1.035);
  opacity: 0.72;
}

.category-card span {
  position: absolute;
  left: 28px;
  bottom: 28px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 26px;
}

.section-head a {
  border-bottom: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

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

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

.product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.product-card a {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--soft);
}

.product-card img {
  transition: transform 360ms ease;
}

.product-card:hover img {
  transform: scale(1.025);
}

.product-info {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 78px;
  padding: 13px 0 10px;
}

.product-info h3 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.25;
}

.product-info p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.product-info strong {
  white-space: nowrap;
}

.add-cart {
  width: 100%;
  border-radius: 0;
}

.editorial,
.collection-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto 70px;
  padding: 0 28px;
}

.editorial img,
.collection-hero img {
  aspect-ratio: 4 / 5;
}

.editorial h2,
.collection-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 5vw, 74px);
  line-height: 0.98;
}

.editorial p {
  max-width: 540px;
  margin-bottom: 26px;
}

.page-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 76px 28px 44px;
}

.page-hero.compact h1 {
  max-width: 760px;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 0.98;
}

.page-hero p {
  max-width: 620px;
  margin-top: 18px;
}

.shop-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 36px;
  padding-top: 16px;
}

.filter-panel {
  position: sticky;
  top: 100px;
  align-self: start;
  display: grid;
  gap: 10px;
}

.filter-panel h2 {
  font-size: 30px;
  margin-bottom: 10px;
}

.filter-chip {
  min-height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  padding: 0 14px;
}

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

.collection-hero {
  padding-top: 62px;
  margin-bottom: 0;
}

.collection-hero.reverse img {
  order: 2;
}

.promo-band {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
  padding: 28px;
  color: #fff;
  background: var(--accent);
}

.promo-band span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 4vw, 46px);
  line-height: 1.05;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.7fr);
  gap: 58px;
  align-items: start;
}

.product-photo {
  aspect-ratio: 4 / 5;
  background: var(--soft);
}

.product-panel {
  position: sticky;
  top: 100px;
  padding-top: 20px;
}

.product-panel h1 {
  font-size: clamp(36px, 5vw, 70px);
  line-height: 1;
}

.detail-price {
  margin: 20px 0;
  font-size: 24px;
  font-weight: 800;
}

.size-picker {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 28px 0 14px;
}

.size-picker button {
  min-height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.size-picker button.active,
.size-picker button:hover {
  border-color: var(--ink);
}

.detail-notes {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.detail-notes p {
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 42px;
  padding-top: 20px;
}

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

.cart-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.cart-row img {
  aspect-ratio: 4 / 5;
}

.cart-row h3 {
  margin: 0 0 6px;
}

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

.quantity-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  border: 1px solid var(--line);
}

.quantity-control button,
.remove-item {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.quantity-control button {
  width: 34px;
  height: 34px;
  font-size: 18px;
}

.remove-item {
  color: var(--muted);
  text-decoration: underline;
}

.summary {
  align-self: start;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
}

.summary h2 {
  font-size: 30px;
  margin-bottom: 20px;
}

.summary div {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.summary .total {
  margin-bottom: 18px;
  font-size: 20px;
}

.summary a {
  display: block;
  margin-top: 16px;
  text-align: center;
  text-decoration: underline;
}

.form-page {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.8fr);
  gap: 54px;
  align-items: start;
}

.form-page h1,
.story h1 {
  font-size: clamp(42px, 6vw, 82px);
  line-height: 0.98;
}

.panel-form {
  display: grid;
  gap: 16px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
}

.panel-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.panel-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-lines {
  display: grid;
  gap: 8px;
  margin-top: 28px;
  font-weight: 700;
}

.story {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 50px;
  align-items: end;
}

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding-top: 0;
}

.values div {
  min-height: 220px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
}

.values h2 {
  font-size: 30px;
}

.site-footer {
  display: block;
  margin-top: 40px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(182, 155, 101, 0.13), transparent 34%),
    var(--ink);
}

.site-footer p {
  margin: 8px 0 0;
  color: #c9c2ba;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 54px 28px 30px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(260px, 1.15fr) repeat(3, minmax(150px, 0.55fr)) minmax(250px, 0.85fr);
  gap: 34px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
}

.footer-logo-mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--ink);
  background: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 700;
}

.footer-brand p {
  max-width: 360px;
  margin-top: 18px;
}

.footer-column h2,
.footer-newsletter h2 {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 12px;
  text-transform: uppercase;
}

.footer-column nav {
  display: grid;
  gap: 10px;
  font-size: 13px;
  text-transform: uppercase;
}

.footer-column a,
.footer-bottom a {
  color: #f6f1ea;
}

.footer-column a:hover,
.footer-bottom a:hover {
  color: var(--gold);
}

.footer-newsletter p {
  max-width: 300px;
  margin-bottom: 16px;
}

.footer-newsletter form {
  display: flex;
  gap: 8px;
}

.footer-newsletter input {
  min-width: 0;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 13px 12px;
  outline: none;
}

.footer-newsletter input::placeholder {
  color: #bdb5ac;
}

.footer-newsletter button {
  min-width: 46px;
  border: 1px solid #fff;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.footer-status {
  min-height: 20px;
  font-size: 12px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  color: #bdb5ac;
  font-size: 12px;
}

.footer-bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 18px;
  color: #fff;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.empty-state {
  padding: 36px;
  background: #fff;
  border: 1px solid var(--line);
}

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

  .nav-links {
    position: fixed;
    inset: 68px 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 28px 28px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }

  body.menu-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
  }

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

  .split-feature,
  .editorial,
  .collection-hero,
  .shop-layout,
  .product-detail,
  .cart-layout,
  .form-page,
  .story {
    grid-template-columns: 1fr;
  }

  .collection-hero.reverse img {
    order: 0;
  }

  .category-grid,
  .values {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 360px;
  }

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

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

  .footer-brand,
  .footer-newsletter {
    grid-column: span 2;
  }

  .filter-panel,
  .product-panel {
    position: static;
  }

  .filter-panel {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .filter-panel h2 {
    display: none;
  }

  .filter-chip {
    white-space: nowrap;
    min-width: max-content;
  }
}

@media (max-width: 640px) {
  .site-header {
    display: flex;
    justify-content: space-between;
    min-height: 62px;
    gap: 10px;
    padding: 0 12px;
  }

  .brand {
    font-size: 12px;
    max-width: 190px;
  }

  .brand::before {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  .brand::after {
    display: none;
  }

  .header-actions {
    position: absolute;
    top: 14px;
    right: 10px;
    gap: 1px;
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }

  .icon-button svg {
    width: 20px;
    height: 20px;
  }

  .header-actions .icon-button[href="account.html"] {
    display: none;
  }

  .nav-links {
    inset: 62px 0 auto;
    padding-inline: 18px;
  }

  .search-panel {
    top: 62px;
    padding: 18px;
  }

  .search-row,
  .promo-band,
  .site-footer,
  .section-head,
  .footer-newsletter form,
  .footer-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-inner {
    padding: 42px 18px 24px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-brand,
  .footer-newsletter {
    grid-column: auto;
  }

  .footer-logo-mark {
    width: 42px;
    height: 42px;
  }

  .hero {
    min-height: 690px;
  }

  .hero-copy {
    padding: 0 18px 70px;
  }

  .hero-copy h1 {
    max-width: 350px;
    font-size: 42px;
    line-height: 1.04;
  }

  .section,
  .shop-layout,
  .cart-layout,
  .product-detail,
  .form-page,
  .story,
  .values,
  .page-hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .editorial,
  .collection-hero {
    padding-left: 18px;
    padding-right: 18px;
    gap: 28px;
  }

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

  .product-info {
    min-height: auto;
  }

  .cart-row {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .cart-row > strong {
    grid-column: 2;
  }

  .summary,
  .panel-form {
    padding: 20px;
  }

  .site-footer nav {
    flex-wrap: wrap;
  }
}
