/* Relievo — Shop */

/* ---------- Product ---------- */
.product { padding: calc(var(--nav-h) + clamp(1.5rem, 4vh, 3rem)) 0 clamp(4rem, 8vw, 6rem); }
.product__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.gallery { display: grid; gap: 12px; }
.gallery__stage {
  position: relative;
  aspect-ratio: 1 / 1.02;
  border-radius: 18px;
  background: var(--paper);
  overflow: hidden;
  display: grid;
  place-items: center;
  transition: background-color 0.4s ease;
}
.gallery__stage.is-dark { background: var(--graphite); }
.gallery__main {
  width: 82%;
  height: 86%;
  object-fit: contain;
  filter: drop-shadow(0 22px 28px rgba(28, 28, 30, 0.16));
}
.gallery__stage.is-photo .gallery__main { width: 100%; height: 100%; object-fit: cover; object-position: 42% 40%; filter: none; }
.gallery__thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb {
  width: 76px;
  height: 76px;
  padding: 6px;
  border: 0;
  border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
  box-shadow: inset 0 0 0 1.5px transparent;
  transition: box-shadow 0.2s ease;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb--dark { background: var(--graphite); }
.thumb--photo { padding: 0; overflow: hidden; }
.thumb--photo img { object-fit: cover; border-radius: 12px; }
.thumb:hover { box-shadow: inset 0 0 0 1.5px var(--ink-faint); }
.thumb[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--concrete), 0 0 0 4px var(--graphite); }

.buy { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.buy__title {
  font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.75rem);
  font-weight: 700;
  font-stretch: 100%;
  line-height: 1.08;
  letter-spacing: -0.028em;
  margin: 0 0 1rem;
  text-wrap: balance;
}
.buy__price {
  margin: 0 0 1.25rem;
  font-size: var(--step-2);
  font-weight: 650;
  font-stretch: 100%;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.buy__lede { color: var(--ink-soft); margin: 0 0 1.75rem; max-width: 44ch; }
.buy__option { margin-bottom: 1.5rem; }
.buy__option-label { margin: 0 0 0.6rem; color: var(--ink-soft); }
.buy__option-label strong { color: var(--graphite); }
.swatches { display: flex; gap: 0.6rem; }
.swatch {
  display: inline-grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--concrete), 0 0 0 4px var(--graphite);
  cursor: default;
}
.swatch__chip {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--graphite);
  overflow: hidden;
}
.swatch__chip::after {
  content: "";
  position: absolute;
  right: 9px; top: 7px;
  width: 5px; height: 15px;
  border-radius: 2px;
  background: #e5312b;
  transform: rotate(18deg);
}
.buy__row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.qty--lg button { width: 48px; height: 52px; }
.qty--lg output { min-width: 2.5ch; font-size: 1.1rem; }
.buy__add { flex: 1; min-width: 220px; min-height: 56px; }
.buy__add.is-added { --btn-bg: var(--graphite); --btn-fg: var(--on-dark); }
.buy__demo { margin: 0.9rem 0 2rem; font-size: var(--step--1); color: var(--ink-soft); }
.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.facts li {
  position: relative;
  padding: 0.9rem 0 0.9rem 1.4rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}
.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.15rem;
  width: 4px;
  height: 1rem;
  border-radius: 1px;
  background: var(--signal);
}
.facts strong { color: var(--graphite); font-weight: 650; }

/* flying bag */
.fly {
  position: fixed;
  z-index: 95;
  left: 0; top: 0;
  width: 110px;
  pointer-events: none;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.3));
}
.bag-btn.is-bump .bag-btn__count { animation: bump 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes bump { 40% { transform: scale(1.5); } }

@media (max-width: 900px) {
  .product__grid { grid-template-columns: 1fr; }
  .buy { position: static; }
  .gallery__stage { aspect-ratio: 1 / 0.95; }
  .thumb { width: 62px; height: 62px; }
}

/* ---------- For you ---------- */
.foryou { background: var(--graphite); color: var(--on-dark); padding-block: clamp(4.5rem, 9vw, 7rem); }
.foryou__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.foryou__title { margin: 0; color: var(--on-dark); }
.foryou__list { list-style: none; margin: 0; padding: 0; }
.foryou__list li {
  position: relative;
  padding: 1.25rem 0 1.25rem 2.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: var(--step-1);
  line-height: 1.35;
}
.foryou__list li:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.foryou__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.45rem;
  width: 18px; height: 10px;
  border-left: 3px solid var(--signal);
  border-bottom: 3px solid var(--signal);
  transform: rotate(-45deg);
}
@media (max-width: 820px) { .foryou__grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { padding-block: clamp(4.5rem, 9vw, 7rem); }
.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  list-style: none;
  padding: 1.25rem 3rem 1.25rem 0;
  font-size: var(--step-1);
  font-weight: 650;
  font-stretch: 100%;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.5rem;
  top: 50%;
  width: 16px; height: 2px;
  background: currentColor;
  transition: transform 0.25s ease;
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details p { margin: 0 0 1.4rem; color: var(--ink-soft); max-width: 60ch; }
@media (max-width: 820px) { .faq__grid { grid-template-columns: 1fr; } }

/* ---------- Checkout dialog ---------- */
.checkout {
  width: min(980px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--paper);
  color: var(--graphite);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35);
  overflow: auto;
}
.checkout::backdrop { background: rgba(20, 20, 22, 0.55); backdrop-filter: blur(4px); }
.checkout[open] { animation: pop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes pop { from { transform: translateY(16px) scale(0.98); opacity: 0; } }
.checkout__inner { position: relative; padding: clamp(1.5rem, 4vw, 2.75rem); }
.checkout__close { position: absolute; right: 1rem; top: 1rem; }
.checkout__title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.5rem);
  font-weight: 700;
  font-stretch: 100%;
  line-height: 1.1;
  letter-spacing: -0.028em;
}
.checkout__title:focus { outline: none; }
.checkout__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.35rem; min-width: 0; align-content: start; }
.field label { font-weight: 600; font-size: var(--step--1); }
.field input {
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid rgba(28, 28, 30, 0.22);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  color: var(--graphite);
}
.field input:focus { outline: none; border-color: var(--graphite); box-shadow: 0 0 0 3px rgba(234, 122, 43, 0.45); }
.field input[aria-invalid="true"] { border-color: #b42318; }
.field__error { margin: 0; color: #b42318; font-size: var(--step--1); font-weight: 600; }
.field-row { display: grid; grid-template-columns: 1.4fr 0.8fr 0.9fr; gap: 0.75rem; align-items: start; }
.form__submit { width: 100%; min-height: 56px; margin-top: 0.25rem; }

.summary {
  padding: 1.25rem;
  border-radius: 14px;
  background: var(--concrete);
}
.summary__item { display: grid; grid-template-columns: 64px 1fr; gap: 0.9rem; align-items: center; margin-bottom: 1.25rem; }
.summary__name { margin: 0; font-weight: 700; line-height: 1.25; }
.summary__meta { margin: 0.2rem 0 0; color: var(--ink-soft); font-size: var(--step--1); }
.summary__rows { margin: 0; }
.summary__rows div {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.summary__rows dt { color: var(--ink-soft); }
.summary__rows dd { margin: 0; font-weight: 600; }
.summary__total dt,
.summary__total dd { color: var(--graphite); font-weight: 800; font-size: var(--step-1); }

.checkout__done,
.checkout__empty { text-align: center; padding-block: 1.5rem; }
.checkout__done .checkout__title,
.checkout__empty .checkout__title { margin-bottom: 1rem; }
.done__heat { width: 120px; height: 80px; margin: 0 auto 1rem; display: block; overflow: visible; }
.done__heat path {
  fill: none;
  stroke: var(--ember);
  stroke-width: 6;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(255, 74, 18, 0.7));
}
.done__text { max-width: 46ch; margin: 0 auto 0.75rem; color: var(--ink-soft); }
.done__order { margin: 0 0 2rem; font-variant-numeric: tabular-nums; }
.done__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.checkout__empty p { color: var(--ink-soft); margin: 0 0 1.5rem; }

@media (max-width: 760px) {
  .checkout { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
  .checkout__grid { grid-template-columns: 1fr; }
  .summary { order: -1; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row .field:first-child { grid-column: 1 / -1; }
}
