:root {
  --purple-900: #2e1e2f;
  --purple-800: #5a3d5b;
  --purple-700: #734c74;
  --purple-500: #9b7b9c;
  --ivory-100: #fcf4e6;
  --ivory-200: #f3e4c9;
  --ivory-300: #e8d3ae;
  --accent: #734c74;
  --accent-dark: #5a3d5b;
  --text: #2e1e2f;
  --muted: #8a7389;
  --radius: 16px;
  --shadow: 0 20px 50px -20px rgba(46, 30, 47, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ivory-100);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: "Playfair Display", Georgia, serif;
  margin: 0 0 0.4em;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  padding: 24px 0;
}

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

.brand {
  font-family: "Quicksand", "Inter", sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--purple-700);
}

.channel-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--purple-700);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--ivory-300);
  padding: 8px 16px;
  border-radius: 999px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.channel-link:hover {
  border-color: var(--accent);
  background: #fff;
}

.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  padding: 24px 0 56px;
}

.product__gallery {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 1;
}

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

.badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-dark);
  margin: 0 0 8px;
}

.product__info h1 {
  font-size: 40px;
  color: var(--purple-900);
}

.subtitle {
  color: var(--muted);
  font-size: 17px;
  margin: 0 0 24px;
  max-width: 44ch;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 28px;
}

.price {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 34px;
  font-weight: 700;
  color: var(--purple-800);
}

.price-unit {
  color: var(--muted);
  font-size: 14px;
}

.option-group {
  margin-bottom: 22px;
}

.option-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.pill-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  border: 1.5px solid var(--ivory-300);
  background: #fff;
  color: var(--purple-800);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill:hover {
  border-color: var(--accent);
}

.pill.active {
  background: var(--purple-800);
  border-color: var(--purple-800);
  color: #fff;
}

.select-wrap {
  position: relative;
  max-width: 320px;
}

.select-wrap::after {
  content: "▾";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

#grindSelect {
  width: 100%;
  appearance: none;
  border: 1.5px solid var(--ivory-300);
  background: #fff;
  color: var(--text);
  padding: 12px 40px 12px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}

#grindSelect:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.buy-btn {
  width: 100%;
  max-width: 320px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  margin-top: 8px;
}

.buy-btn:hover { background: var(--accent-dark); }
.buy-btn:active { transform: scale(0.98); }

.buy-btn:disabled {
  background: var(--ivory-300);
  color: var(--muted);
  cursor: not-allowed;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  max-width: 40ch;
  margin-top: 14px;
}

.details {
  border-top: 1px solid var(--ivory-300);
  padding: 48px 0 64px;
}

.details h2 {
  font-size: 28px;
  color: var(--purple-900);
  margin-bottom: 24px;
}

.specs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 24px;
  margin: 0 0 40px;
  max-width: 560px;
}

.specs dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.specs dd {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

.details h3 {
  font-size: 20px;
  color: var(--purple-800);
}

.description p {
  color: var(--text);
  font-size: 16px;
  max-width: 68ch;
  margin: 0 0 14px;
}

.site-footer {
  border-top: 1px solid var(--ivory-300);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer a {
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

@media (max-width: 780px) {
  .product {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .product__info h1 { font-size: 30px; }
}
