:root {
  --ink: #241c15;
  --ink-soft: #5c5044;
  --paper: #faf6ef;
  --paper-alt: #f1e9da;
  --line: #e4d9c4;
  --turquoise: #1c7c79;
  --turquoise-dark: #145f5c;
  --turquoise-light: #e6f3f2;
  --clay: #b45309;
  --danger: #9d3b3b;
  --radius: 14px;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --sans: -apple-system, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}

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

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

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: 1160px;
  margin: 0 auto;
  gap: 24px;
}

.site-header__brand {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.site-header__nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex-wrap: wrap;
}

.site-header__nav a:hover { color: var(--turquoise-dark); }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
}

.cart-pill__count {
  background: var(--turquoise);
  color: white;
  font-size: 12px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* ---------- carousel ---------- */

.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  max-height: 520px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--turquoise-light) 0%, var(--paper) 65%);
  border-bottom: 1px solid var(--line);
}

.carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

.carousel__slide.is-active { opacity: 1; }

.carousel__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(36,28,21,0.55) 0%, rgba(36,28,21,0) 55%);
}

.carousel__caption {
  position: relative;
  z-index: 1;
  padding: 40px 48px;
  color: white;
  max-width: 560px;
}

.carousel__caption h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 4vw, 38px);
  margin: 0 0 8px;
}

.carousel__caption p {
  margin: 0 0 16px;
  opacity: 0.92;
}

.carousel__dots {
  position: absolute;
  bottom: 16px;
  right: 24px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  padding: 0;
}

.carousel__dot.is-active { background: white; }

.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255,255,255,0.85);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel__arrow--prev { left: 16px; }
.carousel__arrow--next { right: 16px; }

@media (max-width: 760px) {
  .carousel { aspect-ratio: 4 / 5; max-height: 460px; }
  .carousel__caption { padding: 24px; }
}

/* ---------- hero ---------- */

.hero {
  background: linear-gradient(160deg, var(--turquoise-light) 0%, var(--paper) 65%);
  border-bottom: 1px solid var(--line);
}

.hero__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 84px 24px 72px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.hero__eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--turquoise-dark);
}

.hero__title {
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  margin: 0;
  max-width: 16ch;
}

.hero__lede {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 52ch;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
}

.button--primary {
  background: var(--turquoise);
  color: white;
}
.button--primary:hover { background: var(--turquoise-dark); }

.button--ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.button--ghost:hover { background: var(--ink); color: var(--paper); }

.button--full { width: 100%; justify-content: center; }
.button[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- section headings ---------- */

.section {
  padding: 64px 0;
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

.section__title {
  font-family: var(--serif);
  font-size: 28px;
  margin: 0;
}

.section__link {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--turquoise-dark);
}

/* ---------- product grid / card ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 28px;
}

.product-card { display: flex; flex-direction: column; gap: 12px; }

.product-photo {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(155deg, var(--turquoise-light), var(--paper-alt));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

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

.product-photo__gem {
  width: 34%;
  color: var(--turquoise);
  opacity: 0.55;
}

.product-photo__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
}

.product-photo__badge--sold {
  background: var(--danger);
}

.product-photo__badge--sale {
  background: var(--clay);
}

.product-photo__badge--new {
  background: var(--turquoise);
}

.product-card__title {
  font-size: 15px;
  font-weight: 700;
}

.product-card__meta {
  font-size: 13px;
  color: var(--ink-soft);
}

.product-card__price {
  font-weight: 700;
  font-family: var(--serif);
  font-size: 17px;
}

.price-strike {
  text-decoration: line-through;
  color: var(--ink-soft);
  font-weight: 400;
  font-size: 14px;
  margin-right: 6px;
}

/* ---------- shop layout ---------- */

.shop-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}

.filter-block { margin-bottom: 28px; }

.filter-block__title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.filter-list { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.filter-list a.active { color: var(--turquoise-dark); font-weight: 700; }

.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--ink-soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- product detail ---------- */

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

.product-gallery__main {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: linear-gradient(155deg, var(--turquoise-light), var(--paper-alt));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery__main .product-photo__gem { width: 30%; }

.product-gallery__thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.product-gallery__thumbs > div {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: var(--paper-alt);
  border: 1px solid var(--line);
}

.product-info__eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--turquoise-dark);
  margin-bottom: 6px;
}

.product-info__title {
  font-family: var(--serif);
  font-size: 32px;
  margin: 0 0 12px;
}

.product-info__price {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
}

.product-info__desc {
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.variant-form { display: flex; flex-direction: column; gap: 18px; }

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

.variant-pill {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: white;
}

.variant-pill:has(input:checked) {
  border-color: var(--turquoise);
  background: var(--turquoise-light);
  color: var(--turquoise-dark);
}

.variant-pill input { position: absolute; opacity: 0; pointer-events: none; }
.variant-pill--disabled { opacity: 0.4; text-decoration: line-through; cursor: not-allowed; }

.stock-note { font-size: 13px; color: var(--ink-soft); }
.stock-note--low { color: var(--clay); font-weight: 600; }
.stock-note--out { color: var(--danger); font-weight: 600; }

.info-card {
  margin-top: 28px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-alt);
  font-size: 13px;
  color: var(--ink-soft);
}

.info-card strong { color: var(--ink); }

/* ---------- reviews ---------- */

.reviews { border-top: 1px solid var(--line); padding: 48px 0; }

.review {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.review__stars { color: var(--clay); font-size: 14px; letter-spacing: 2px; }
.review__title { font-weight: 700; margin: 6px 0 4px; }
.review__body { color: var(--ink-soft); font-size: 14px; }

/* ---------- cart ---------- */

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

.cart-line {
  display: grid;
  grid-template-columns: 84px 1fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line__photo {
  width: 84px;
  height: 84px;
  border-radius: 10px;
  background: linear-gradient(155deg, var(--turquoise-light), var(--paper-alt));
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-line__photo .product-photo__gem { width: 40%; }

.cart-line__title { font-weight: 700; font-size: 14px; }
.cart-line__meta { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }

.qty-input {
  width: 56px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}

.remove-link {
  font-size: 12px;
  color: var(--danger);
  font-weight: 600;
  text-decoration: underline;
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: white;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--ink-soft);
}

.summary-row--total {
  font-weight: 700;
  color: var(--ink);
  font-size: 17px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 4px;
}

.form-card {
  max-width: 420px;
  margin: 64px auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.form-card h1 { font-family: var(--serif); font-size: 24px; margin-top: 0; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); margin-bottom: 6px; }
.field input, .field textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-family: inherit; }

.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.alert--error { background: #fbeaea; color: var(--danger); }
.alert--success { background: var(--turquoise-light); color: var(--turquoise-dark); }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 60px;
  padding: 48px 0 32px;
  color: var(--ink-soft);
  font-size: 13px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.site-footer__brand { font-family: var(--serif); font-size: 18px; color: var(--ink); margin-bottom: 8px; }
.site-footer__heading { font-weight: 700; color: var(--ink); margin-bottom: 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.site-footer__links { display: flex; flex-direction: column; gap: 8px; }
.site-footer__bottom { border-top: 1px solid var(--line); padding-top: 20px; }

.site-footer__bottom--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer__credit {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  white-space: nowrap;
}

.site-footer__credit span {
  display: inline-block;
  line-height: 16px;
}

.site-footer__credit:hover { color: var(--turquoise-dark); }

.site-footer__credit-logo {
  display: block;
  height: 16px;
  width: auto;
  vertical-align: middle;
  /* The "b"'s ascender is empty space above the x-height letters (measured:
     ink starts at row 0/799 for the ascender stem, but the x-height body —
     n/i/m/u/s — only starts around row 255/799). That leaves the visible
     letterforms' optical center sitting well below the box's true vertical
     center, so centering the box against the text still looks bottom-heavy.
     Nudge up to compensate. */
  transform: translateY(-2.5px);
  /* the source mark is a saturated blue; on a warm ivory footer it reads
     slightly flat, so nudge it the way the Huvi's BBQ site's footer did */
  filter: brightness(0.95) saturate(1.15);
}

@media (max-width: 760px) {
  .site-header__nav { display: none; }
  .shop-layout { grid-template-columns: 1fr; }
  .product-detail { grid-template-columns: 1fr; gap: 32px; }
  .cart-page { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
}
