:root {
  --ink: #101010;
  --muted: #5f5f5f;
  --line: #c7c2b8;
  --paper: #f4f0e8;
  --panel: #e8e1d7;
  --white: #fffdf8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 160px 1fr auto;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--ink);
  background: rgba(244, 240, 232, 0.96);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 22px;
  border-right: 1px solid var(--ink);
  font-size: 26px;
  font-weight: 900;
}

.nav,
.actions {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 22px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.nav {
  justify-content: center;
}

.actions {
  justify-content: flex-end;
}

.cart span {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 10px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(370px, 0.42fr) minmax(0, 1fr);
  min-height: calc(100vh - 44px);
  border-bottom: 1px solid var(--ink);
  background: var(--white);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
  padding: 34px;
  border-right: 1px solid var(--ink);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 510px;
  font-size: clamp(48px, 6.6vw, 96px);
  line-height: 0.9;
  text-transform: uppercase;
}

.hero-copy > p:last-child {
  max-width: 480px;
  color: #2f2b27;
  font-size: 16px;
  line-height: 1.45;
}

.hero-media {
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 560px;
  background: #ede7de;
}

.hero-media img {
  width: min(100%, 1240px);
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.shop-shell {
  display: grid;
  grid-template-columns: 170px 1fr;
  background: var(--white);
}

.filters {
  position: sticky;
  top: 44px;
  align-self: start;
  min-height: calc(100vh - 44px);
  padding: 32px 18px;
  border-right: 1px solid var(--ink);
  background: var(--white);
  text-align: right;
}

.filters h2 {
  margin-bottom: 28px;
  font-size: 12px;
  text-transform: uppercase;
}

.filters button {
  display: block;
  width: 100%;
  margin: 10px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.filters .active,
.filters button:hover {
  color: var(--ink);
  text-decoration: underline;
}

.filter-group {
  margin-top: 52px;
}

.filter-group p {
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.catalog {
  min-width: 0;
}

.catalog-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 28px;
  border-bottom: 1px solid var(--ink);
}

.catalog-head h2 {
  margin-top: 6px;
  font-size: 34px;
  line-height: 1;
  text-transform: uppercase;
}

.search-inline {
  display: grid;
  gap: 7px;
  min-width: min(360px, 100%);
}

.search-inline label,
.modal label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.search-inline input,
.modal input,
.modal select {
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  padding: 12px;
}

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

.product-card {
  display: grid;
  grid-template-rows: 500px auto;
  min-height: 590px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--white);
  text-align: left;
}

.product-card:nth-child(3n) {
  border-right: 0;
}

.product-card:hover .product-image {
  filter: contrast(1.04);
  transform: scale(1.015);
}

.product-image {
  background-color: #eee8df;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: transform 180ms ease, filter 180ms ease;
}

.product-image img,
.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-info {
  display: grid;
  gap: 12px;
  padding: 14px 16px 18px;
}

.product-line {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-size: 12px;
  font-weight: 900;
}

.product-line span {
  color: var(--muted);
  white-space: nowrap;
}

.product-meta {
  color: #3f3a34;
  font-size: 13px;
  line-height: 1.35;
}

.empty-state {
  display: none;
  padding: 36px 28px;
  border-bottom: 1px solid var(--ink);
  font-weight: 900;
  text-transform: uppercase;
}

.facts {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  padding: 72px 34px;
  border-bottom: 1px solid var(--ink);
  background:
    linear-gradient(rgba(16, 16, 16, 0.74), rgba(16, 16, 16, 0.74)),
    url("why-mmhm-minimal-lookbook.png") center / cover;
  color: var(--white);
}

.facts .eyebrow {
  color: #d7d0c6;
}

.facts h2 {
  max-width: 720px;
  margin-top: 10px;
  font-size: clamp(34px, 5vw, 74px);
  line-height: 0.95;
  text-transform: uppercase;
}

.fact-panel {
  display: grid;
  align-content: end;
  gap: 0;
  background: rgba(244, 240, 232, 0.92);
  color: var(--ink);
}

.fact-panel p {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 20px;
  padding: 22px;
  border-bottom: 1px solid var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.fact-panel p:last-child {
  border-bottom: 0;
}

.modal {
  width: min(920px, calc(100vw - 28px));
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  padding: 0;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.38);
}

.close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 1;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.modal-image {
  min-height: 560px;
  border-right: 1px solid var(--ink);
  background-color: #eee8df;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.modal-copy,
.side-modal {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 42px 24px 24px;
}

.modal-copy h2,
.side-modal h2 {
  font-size: 34px;
  line-height: 0.95;
  text-transform: uppercase;
}

.price {
  font-size: 24px;
  font-weight: 900;
}

.primary {
  width: 100%;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  padding: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.primary:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.image-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--ink);
}

.image-switcher:empty {
  display: none;
}

.image-switcher button {
  padding: 10px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.image-switcher button + button {
  border-left: 1px solid var(--ink);
}

.image-switcher .active {
  background: var(--ink);
  color: var(--white);
}

.side-modal {
  width: min(430px, calc(100vw - 28px));
  margin-left: auto;
  min-height: 100vh;
}

.bag-items {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--ink);
}

.bag-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ink);
}

.bag-row small {
  color: var(--muted);
  font-weight: 800;
}

.bag-total {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  font-size: 18px;
  font-weight: 900;
}

.checkout-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.account-form {
  display: grid;
  gap: 10px;
}

.account-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--ink);
}

.account-tabs button {
  padding: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.account-tabs button + button {
  border-left: 1px solid var(--ink);
}

.account-tabs .active {
  background: var(--ink);
  color: var(--white);
}

.signup-only {
  display: none;
  gap: 10px;
}

.account-form.signup-mode .signup-only {
  display: grid;
}

.form-message {
  color: #245c2f;
  font-weight: 800;
}

.account-status {
  border-top: 1px solid var(--ink);
  padding-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.logout-button {
  display: block;
  width: 100%;
  margin-top: 12px;
  border: 1px solid var(--ink);
  padding: 10px;
  color: var(--ink);
  font-weight: 900;
  text-transform: uppercase;
}

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

  .brand {
    border-right: 0;
  }

  .nav {
    display: none;
  }

  .actions {
    gap: 12px;
    padding: 0 14px;
  }

  .hero,
  .shop-shell,
  .facts,
  .modal-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
    padding: 28px 18px;
  }

  .hero-media {
    order: -1;
    min-height: 420px;
    border-bottom: 1px solid var(--ink);
  }

  .filters {
    position: static;
    display: flex;
    min-height: auto;
    gap: 16px;
    overflow-x: auto;
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
    text-align: left;
  }

  .filters h2,
  .filter-group {
    display: none;
  }

  .filters button {
    width: auto;
    white-space: nowrap;
    text-align: left;
  }

  .catalog-head {
    align-items: start;
    flex-direction: column;
    padding: 22px 16px;
  }

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

  .product-card,
  .product-card:nth-child(3n) {
    border-right: 0;
  }

  .product-card {
    grid-template-rows: 430px auto;
    min-height: 520px;
  }

  .facts {
    padding: 48px 18px;
  }

  .modal-image {
    min-height: 380px;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .side-modal {
    min-height: auto;
    max-height: calc(100vh - 28px);
    overflow: auto;
  }
}

@media (min-width: 981px) and (max-width: 1260px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-card:nth-child(3n) {
    border-right: 1px solid var(--ink);
  }

  .product-card:nth-child(2n) {
    border-right: 0;
  }
}
