:root {
  --ink: #243625;
  --moss: #536846;
  --leaf: #7d9366;
  --cream: #fbf6eb;
  --paper: #fffdf7;
  --muted: #6d715f;
  --line: rgba(36, 54, 37, 0.16);
  --shadow: 0 18px 48px rgba(51, 62, 40, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(120deg, rgba(244, 234, 219, 0.65), rgba(255, 253, 247, 0.92) 42%, rgba(232, 239, 221, 0.78)),
    var(--paper);
  color: var(--ink);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.5;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 82px;
  align-items: center;
  padding: 10px clamp(18px, 4vw, 56px);
  background: rgba(255, 253, 247, 0.86);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 10px 30px rgba(36, 54, 37, 0.08);
}

.brand-mark img {
  width: 74px;
  aspect-ratio: 1;
  object-fit: contain;
}

.catalog-page {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 70px) clamp(18px, 5vw, 78px) clamp(56px, 8vw, 100px);
}

.catalog-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(20px, 4vw, 44px);
  margin-bottom: clamp(32px, 5vw, 58px);
}

.catalog-logo {
  width: clamp(150px, 18vw, 260px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--moss);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  line-height: 0.98;
}

h1 {
  font-size: clamp(3.4rem, 9vw, 8rem);
}

h2 {
  font-size: clamp(1.9rem, 2.4vw, 2.5rem);
}

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

.product-card {
  overflow: hidden;
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.product-media {
  position: relative;
  display: grid;
  min-height: 260px;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), transparent),
    var(--image-tone);
}

.product-media img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.carousel-button {
  position: absolute;
  top: 50%;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(36, 54, 37, 0.18);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.86);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-button:hover {
  background: var(--paper);
  transform: translateY(-50%) scale(1.04);
}

.carousel-button.previous {
  left: 12px;
}

.carousel-button.next {
  right: 12px;
}

.carousel-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.88);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.product-media.placeholder {
  padding: 22px;
  place-items: end start;
  color: rgba(36, 54, 37, 0.72);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.35rem;
  font-weight: 700;
}

.product-media.placeholder::before,
.product-media.placeholder::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(36, 54, 37, 0.1);
  box-shadow: 0 16px 46px rgba(36, 54, 37, 0.12);
}

.product-media.placeholder::before {
  width: 48%;
  height: 30%;
  top: 24%;
  right: 14%;
  border-radius: 45% 55% 50% 50% / 58% 42% 58% 42%;
  background: rgba(255, 253, 247, 0.5);
  transform: rotate(-10deg);
}

.product-media.placeholder::after {
  width: 38%;
  height: 24%;
  top: 42%;
  right: 28%;
  border-radius: 55% 45% 46% 54% / 48% 58% 42% 52%;
  background: rgba(255, 255, 255, 0.38);
  transform: rotate(9deg);
}

.product-media span {
  position: relative;
  z-index: 1;
}

.product-card:nth-child(8n + 1) {
  --image-tone: #dfe8d3;
}

.product-card:nth-child(8n + 2) {
  --image-tone: #ead2bd;
}

.product-card:nth-child(8n + 3) {
  --image-tone: #cddfcf;
}

.product-card:nth-child(8n + 4) {
  --image-tone: #f1e4c5;
}

.product-card:nth-child(8n + 5) {
  --image-tone: #e4d6e7;
}

.product-card:nth-child(8n + 6) {
  --image-tone: #c7ddc8;
}

.product-card:nth-child(8n + 7) {
  --image-tone: #eee1c8;
}

.product-card:nth-child(8n + 8) {
  --image-tone: #f0d5b6;
}

.product-body {
  padding: 22px;
}

.product-tag {
  margin: 0 0 8px;
  color: var(--leaf);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-body p {
  margin: 12px 0 0;
  color: var(--muted);
}

.product-price {
  margin-top: 16px;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 800;
}

.product-gallery {
  display: flex;
  gap: 8px;
  padding: 0 22px 20px;
}

.product-gallery button {
  width: 44px;
  height: 44px;
  padding: 0;
  overflow: hidden;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  opacity: 0.72;
}

.product-gallery button.is-active {
  border-color: var(--moss);
  box-shadow: 0 0 0 2px rgba(83, 104, 70, 0.16);
  opacity: 1;
}

.product-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-meta {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.product-options {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--moss);
  font-size: 0.78rem;
  font-weight: 700;
}

.product-options summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  cursor: pointer;
  list-style: none;
}

.product-options summary::-webkit-details-marker {
  display: none;
}

.product-options summary::after {
  content: "+";
  color: var(--ink);
  font-weight: 900;
}

.product-options[open] summary::after {
  content: "-";
}

.option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 10px 10px;
}

.option-list span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(125, 147, 102, 0.1);
  color: var(--ink);
  font-weight: 600;
}

.loading-state {
  grid-column: 1 / -1;
  color: var(--muted);
}

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

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

  .catalog-heading {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 70px;
  }

  .brand-mark img {
    width: 58px;
  }

  .catalog-page {
    padding-top: 22px;
  }

  .catalog-logo {
    width: 150px;
  }

  h1 {
    font-size: clamp(3.2rem, 18vw, 5.2rem);
  }

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

  .product-media,
  .product-media img {
    min-height: 220px;
  }
}
