:root {
  --bg: #f7f7f4;
  --surface: #ffffff;
  --ink: #1a1c1d;
  --muted: #68706d;
  --line: #deded7;
  --accent: #9f2f33;
  --accent-dark: #611f23;
  --olive: #58624b;
  --gold: #c68c2f;
  --shadow: 0 24px 70px rgba(19, 23, 20, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(26, 28, 29, 0.08);
  background: rgba(247, 247, 244, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  width: max-content;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0;
}

.desktop-nav {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 600;
}

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

.cart-button {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}

.cart-button strong {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.78rem;
}

.store-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: clamp(24px, 5vw, 64px);
  min-height: calc(100svh - 76px);
  padding: clamp(28px, 5vw, 70px) clamp(18px, 4vw, 56px) 36px;
  align-items: center;
}

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

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

.hero-copy h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(2.3rem, 5.6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.7;
}

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

.primary-link,
.secondary-link,
.checkout-button,
.add-cart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.primary-link,
.checkout-button,
.add-cart-button {
  border: 0;
  background: var(--accent);
  color: #fff;
}

.primary-link:hover,
.checkout-button:hover,
.add-cart-button:hover {
  background: var(--accent-dark);
}

.secondary-link {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.promo-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.promo-card {
  position: relative;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.promo-card.has-image {
  color: #fff;
  background: var(--ink);
}

.promo-card.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.64));
}

.promo-card.has-image > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-card.has-image > div {
  position: relative;
  z-index: 1;
}

.promo-card span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.promo-card.has-image span {
  color: rgba(255, 255, 255, 0.78);
}

.promo-card strong {
  margin-top: 8px;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  line-height: 1.1;
}

.featured-promo {
  grid-row: span 2;
  min-height: 520px;
  padding: 0;
}

.featured-promo div {
  padding: 22px;
}

.category-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 clamp(18px, 4vw, 56px) 28px;
}

.category-chip,
.filter-option,
.size-filter,
.size-options button,
.quantity-control button,
.thumb-row button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.category-chip {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 800;
}

.category-chip.active,
.filter-option.active,
.size-filter.active,
.size-options button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.catalog-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  padding: 0 clamp(18px, 4vw, 56px) 64px;
  align-items: start;
}

.filters-panel {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.filters-panel h2,
.section-heading h2,
.cart-header h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.search-field {
  display: grid;
  gap: 8px;
}

.search-field span,
.filter-group > span,
.option-block > span,
.quantity-row > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fbfbf8;
  outline: none;
}

.search-field input:focus {
  border-color: var(--ink);
}

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

.filter-option {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  text-align: left;
  font-weight: 700;
}

.size-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.size-filter {
  min-height: 40px;
  border-radius: 8px;
  font-weight: 800;
}

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

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

.section-heading span {
  color: var(--muted);
  font-weight: 700;
}

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

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

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

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

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

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

.product-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
}

.product-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.product-body h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

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

.product-category {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.price {
  font-weight: 900;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.swatch {
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(26, 28, 29, 0.18);
}

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

.details-button,
.quick-add-button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.details-button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.quick-add-button {
  width: 42px;
  border: 1px solid var(--line);
  background: #fbfbf8;
  color: var(--ink);
  font-size: 1.2rem;
}

.empty-state {
  padding: 34px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: center;
}

.empty-state p {
  margin: 8px 0 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 30px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer div {
  display: grid;
  gap: 6px;
}

.site-footer strong,
.site-footer a {
  color: var(--ink);
  font-weight: 900;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(11, 12, 13, 0.56);
}

.modal-backdrop[hidden] {
  display: none;
}

.product-modal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 24px;
  width: min(1080px, 100%);
  max-height: min(840px, calc(100svh - 44px));
  overflow: auto;
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow);
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

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

.modal-gallery {
  display: grid;
  gap: 12px;
  align-content: start;
}

.modal-gallery > img {
  width: 100%;
  height: min(640px, 70svh);
  object-fit: cover;
  border-radius: 8px;
  background: #e8e6df;
}

.thumb-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.thumb-row button {
  flex: 0 0 72px;
  width: 72px;
  height: 82px;
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
}

.thumb-row button.active {
  border-color: var(--ink);
}

.thumb-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-info {
  display: grid;
  gap: 20px;
  align-content: start;
  padding: 16px 8px 8px;
}

.modal-info h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: 0;
}

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

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

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

.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.color-option.active {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

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

.size-options button {
  min-width: 52px;
  min-height: 42px;
  border-radius: 8px;
  font-weight: 900;
}

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

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

.quantity-control button {
  height: 42px;
  border: 0;
  background: transparent;
  font-weight: 900;
}

.quantity-control strong {
  text-align: center;
}

.add-cart-button {
  width: 100%;
}

.cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(430px, 100vw);
  transform: translateX(105%);
  transition: transform 220ms ease;
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.cart-header,
.cart-summary {
  padding: 20px;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.cart-items {
  overflow: auto;
  padding: 10px 20px;
}

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

.cart-item img {
  width: 74px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  background: #e8e6df;
}

.cart-item-info {
  display: grid;
  gap: 8px;
}

.cart-item-info h3 {
  margin: 0;
  font-size: 0.95rem;
}

.cart-item-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

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

.cart-item-actions button {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

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

.cart-summary div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 1.15rem;
}

.checkout-button {
  width: 100%;
}

.checkout-button:disabled {
  cursor: not-allowed;
  background: #c9c9c2;
}

.cart-empty {
  align-self: center;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

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

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: none;
  border: 0;
  background: rgba(11, 12, 13, 0.38);
}

.cart-overlay.open {
  display: block;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 70;
  max-width: min(420px, calc(100vw - 32px));
  transform: translate(-50%, 120px);
  padding: 13px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  text-align: center;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

@media (max-width: 1080px) {
  .store-hero,
  .catalog-shell {
    grid-template-columns: 1fr;
  }

  .store-hero {
    min-height: auto;
  }

  .filters-panel {
    position: static;
  }

  .category-filter {
    display: none;
  }

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

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

  .desktop-nav {
    display: none;
  }

  .cart-button span {
    display: none;
  }

  .store-hero {
    padding-top: 26px;
  }

  .promo-board {
    grid-template-columns: 1fr;
  }

  .featured-promo {
    min-height: 420px;
  }

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

  .modal-gallery > img {
    height: min(520px, 58svh);
  }

  .site-footer,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .catalog-shell,
  .category-strip,
  .store-hero,
  .site-header,
  .site-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .product-grid {
    gap: 14px;
  }

  .product-body {
    padding: 14px;
  }

  .filters-panel {
    padding: 16px;
  }

  .product-modal {
    max-height: calc(100svh - 20px);
    padding: 12px;
  }
}
