:root {
  --bg: #f2efe8;
  --bg-strong: #e8e1d4;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-strong: #fffdf8;
  --border: rgba(43, 38, 31, 0.14);
  --text: #1f1b18;
  --muted: #6a6258;
  --accent: #8b6b43;
  --accent-soft: #d6c2a1;
  --shadow: 0 24px 80px rgba(54, 39, 17, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background:
    radial-gradient(circle at top left, rgba(214, 194, 161, 0.45), transparent 32%),
    linear-gradient(180deg, #f7f4ed 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
}

body {
  margin: 0;
}

a {
  color: inherit;
}

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

.page-shell {
  width: min(1380px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  width: 168px;
  object-fit: contain;
}

.header-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: right;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
}

.catalog-controls {
  display: grid;
  gap: 1.5rem;
  margin: 0.5rem 0 1rem;
}

.search-field {
  display: grid;
  gap: 0.6rem;
}

.search-field span {
  font-size: 0.9rem;
  color: var(--muted);
}

.search-field input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1rem 1.25rem;
  font: inherit;
  background: rgba(255, 255, 255, 0.82);
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-decoration: none;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.58);
}

.category-pill span {
  color: var(--muted);
}

.category-pill.is-active {
  background: var(--text);
  color: white;
  border-color: var(--text);
}

.catalog-summary {
  margin: 0.5rem 0 1.5rem;
  color: var(--muted);
}

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

.product-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100%;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.product-card__media {
  display: block;
  aspect-ratio: 1 / 1;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.9), rgba(240, 233, 222, 0.94));
}

.product-card__media img,
.product-detail__hero-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-card__body {
  display: grid;
  gap: 0.55rem;
  padding: 1rem 1rem 1.2rem;
}

.product-card__body h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.product-card__body h2 a {
  text-decoration: none;
}

.product-card__sku,
.product-card__category {
  margin: 0;
  color: var(--muted);
  font-size: 0.87rem;
}

.product-card__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 100%;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(214, 194, 161, 0.3), rgba(255, 255, 255, 0.55));
}

.product-card__placeholder--large {
  min-height: 540px;
}

.breadcrumbs {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumbs a {
  text-decoration: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.74);
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 2rem;
  align-items: start;
}

.product-detail__gallery,
.product-detail__content {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.product-detail__gallery {
  padding: 1rem;
}

.product-detail__hero-image {
  margin: 0;
  min-height: 540px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.92), rgba(240, 233, 222, 0.94));
  border-radius: 22px;
}

.product-detail__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.product-detail__thumbs img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(247, 242, 235, 0.92);
  padding: 0.4rem;
}

.product-detail__content {
  padding: 2rem;
}

.product-detail__content h1 {
  margin: 0 0 1.2rem;
  font-size: clamp(1.75rem, 3.4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.product-specs {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.8rem;
}

.product-specs div {
  display: grid;
  gap: 0.2rem;
}

.product-specs dt {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.product-specs dd {
  margin: 0;
}

.product-description {
  color: var(--text);
  line-height: 1.65;
}

.product-description p:first-child {
  margin-top: 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .page-shell {
    width: min(100vw - 1rem, 100%);
  }

  .site-header,
  .catalog-controls {
    grid-template-columns: 1fr;
    display: grid;
  }

  .site-header {
    padding-bottom: 1.4rem;
  }

  .header-meta {
    align-items: flex-start;
    text-align: left;
  }

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

  .product-detail__content {
    padding: 1.4rem;
  }

  .product-detail__hero-image,
  .product-card__placeholder--large {
    min-height: 320px;
  }
}

@media (max-width: 520px) {
  .brand {
    align-items: flex-start;
  }

  .brand img {
    width: 132px;
  }

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