/* =========================================================================
   Shift Studio Designs — storefront
   Quiet-premium, editorial, product-led. Warm paper + ink + one signature
   petrol accent. Per-product dynamic theme vars (--accent-color, --bg-soft,
   --hero-bg, --hero-text, --btn-text) are computed server-side in
   theming.py and consumed only inside the .product scope.
   ========================================================================= */

:root {
  /* Site palette */
  --paper: #f5f2ea;
  --paper-deep: #ece5d8;
  --ink: #201e1a;
  --ink-soft: #6d675c;
  --line: #ddd4c2;
  --accent: #3c5d55;       /* signature muted petrol/slate-green */
  --accent-ink: #f5f2ea;   /* text on accent-colored surfaces */

  /* Per-product theme defaults (overridden inline on .product) */
  --accent-color: #4f46e5;
  --bg-soft: #ffffff;
  --hero-bg: #f7f7f8;
  --hero-text: #141414;
  --btn-text: #ffffff;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.6rem;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem 2rem;
}
.brand {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
}
.site-nav a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.site-nav a:hover,
.site-nav a:focus-visible { color: var(--ink); border-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
  margin-top: 5rem;
}
.site-footer__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2.75rem 2rem;
  text-align: center;
}
.site-footer__brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
}
.site-footer__tagline {
  margin: 0 0 1.1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.site-footer__copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

/* ---------- Shop listing ---------- */
.shop { max-width: 1240px; margin: 0 auto; padding: 4rem 2rem 5rem; }
.shop__intro {
  max-width: 560px;
  margin: 0 auto 3.5rem;
  text-align: center;
}
.shop__intro h1 {
  font-size: clamp(2rem, 3.2vw, 2.6rem);
  margin: 0 0 0.75rem;
  color: var(--ink);
}
.shop__lede { margin: 0; color: var(--ink-soft); font-size: 1.02rem; }

.product-grid {
  display: grid;
  gap: 2.75rem 1.75rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.product-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
}
.product-card__frame {
  aspect-ratio: 4 / 5;
  background: var(--paper-deep);
  overflow: hidden;
}
.product-card__frame img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.product-card:hover .product-card__frame img,
.product-card:focus-visible .product-card__frame img { transform: scale(1.035); }
.product-card__placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(160deg, var(--paper-deep), var(--line));
}
.product-card__meta { padding: 1.1rem 0.1rem 0; }
.product-card__meta h2 {
  font-size: 1.02rem;
  font-weight: 500;
  margin: 0 0 0.3rem;
  color: var(--ink);
}
.price { color: var(--ink-soft); margin: 0; font-size: 0.92rem; }
.empty { color: var(--ink-soft); text-align: center; padding: 3rem 0; }

/* ---------- Product detail ---------- */
.product { max-width: 1240px; margin: 0 auto; padding: 3rem 2rem 1rem; }

.pdp {
  display: grid;
  grid-template-columns: 1.2fr 0.85fr;
  gap: 3.5rem;
  align-items: start;
}

.pdp__main-image {
  aspect-ratio: 1 / 1;
  background: var(--paper-deep);
  overflow: hidden;
}
.pdp__main-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp__placeholder { width: 100%; height: 100%; background: linear-gradient(160deg, var(--paper-deep), var(--line)); }

.pdp__thumbs {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}
.pdp__thumb {
  width: 4.5rem; height: 4.5rem;
  padding: 0; border: 1px solid var(--line); background: var(--paper-deep);
  cursor: pointer; overflow: hidden; border-radius: 2px;
}
.pdp__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp__thumb.is-active { border-color: var(--accent); }

.pdp__panel {
  position: sticky;
  top: 2rem;
  background: var(--hero-bg);
  color: var(--hero-text);
  border-radius: 6px;
  padding: 2.5rem 2.25rem;
}
.pdp__panel h1 {
  font-size: clamp(1.7rem, 2.4vw, 2.1rem);
  margin: 0 0 0.6rem;
}
.pdp__price {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 1.1rem;
  opacity: .92;
}
.pdp__desc { font-size: 1rem; margin: 0 0 1.75rem; opacity: .88; }

.buy-form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.4rem; }
.field label {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  opacity: .75;
}
.buy-form select, .buy-form input {
  padding: 0.75rem 0.85rem;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,.18);
  background: rgba(255,255,255,.55);
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--hero-text);
}
.field--qty input { max-width: 7rem; }

.btn-buy {
  margin-top: 0.35rem;
  display: block; width: 100%;
  text-align: center;
  background: var(--accent-color); color: var(--btn-text);
  border: none; border-radius: 3px; padding: 0.95rem 1.4rem;
  font-size: 1rem; font-weight: 600; letter-spacing: 0.02em;
  cursor: pointer; text-decoration: none;
  transition: filter .15s ease;
}
.btn-buy:hover { filter: brightness(1.06); }
.btn-buy:disabled { opacity: .6; cursor: default; }
.checkout-error { color: #b3261e; font-size: .88rem; margin: 0.4rem 0 0; }

.pdp__assurance {
  font-size: 0.82rem;
  opacity: .75;
  margin: 0.85rem 0 0;
}

.pdp__details { margin-top: 1.9rem; border-top: 1px solid rgba(0,0,0,.12); }
.pdp__details details {
  border-bottom: 1px solid rgba(0,0,0,.12);
  padding: 0.95rem 0;
}
.pdp__details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  list-style: none;
}
.pdp__details summary::-webkit-details-marker { display: none; }
.pdp__details summary::after { content: "+"; float: right; opacity: .7; }
.pdp__details details[open] summary::after { content: "\2212"; }
.pdp__details p {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
  opacity: .85;
}

/* How it works */
.how { max-width: 640px; margin: 5rem auto 4rem; text-align: left; }
.how h2 { font-size: 1.5rem; margin: 0 0 0.6rem; }
.how__lede { color: var(--ink-soft); margin: 0 0 2rem; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.steps li { display: flex; align-items: center; gap: 1rem; color: var(--ink); }
.steps span {
  flex: none; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 600; font-size: 0.9rem;
}

/* FAQ */
.faq { max-width: 640px; margin: 0 auto 5rem; text-align: left; }
.faq h2 { font-size: 1.5rem; margin: 0 0 1.1rem; }
.faq details {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--ink);
}
.faq details p { margin: 0.75rem 0 0; color: var(--ink-soft); }

.confirm { max-width: 640px; margin: 4rem auto; padding: 0 1.5rem; text-align: center; }
.muted { color: var(--ink-soft); }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .pdp { grid-template-columns: 1fr; gap: 2rem; }
  .pdp__panel { position: static; padding: 2rem 1.5rem; }
  .site-header__inner { padding: 1.25rem 1.25rem; }
  .shop { padding: 2.5rem 1.25rem 3.5rem; }
  .product { padding: 2rem 1.25rem 1rem; }
}
