/* Product page (/products/<slug>/, rendered by netlify/functions/product.mjs).
   Kept deliberately plain: photo, name, price, one button, the facts. Colors/fonts come from home/styles.css;
   the warm accent (--accent, --accent-2) is mixed in lightly so the page feels like the store, not a white sheet. */

:root { --pp-tint: color-mix(in srgb, var(--accent) 7%, var(--surface)); --pp-tint-strong: color-mix(in srgb, var(--accent) 14%, var(--surface)); }

.pp { max-width: 1040px; margin: 0 auto; padding: 0 5vw 4rem; }
.pp-top { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem 1.2rem; padding: 1.25rem 0 1.5rem; }
.pp-crumbs { font-size: 0.85rem; color: var(--text-dim); }

/* Back to the store: filled in the brand accent so it reads as a main action, 48px tall,
   visible focus ring for keyboard users */
.pp-back {
  display: inline-flex; align-items: center; gap: 0.55rem;
  min-height: 48px; padding: 0.65rem 1.5rem;
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 1.05rem; color: #fff; text-decoration: none;
  background: var(--accent);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.pp-back:hover { background: var(--accent-3); transform: translateY(-1px); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 40%, transparent); }
.pp-back:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.pp-back__arrow { font-size: 1.25rem; line-height: 1; }
.pp-bottom { display: flex; justify-content: center; margin-top: 3rem; }
.pp-crumbs a { text-decoration: underline; text-underline-offset: 3px; }

.pp-main { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: start; }

.pp-media { position: sticky; top: 6rem; }
.pp-media__main { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; display: block; border-radius: var(--radius); background: var(--pp-tint); border: 1px solid var(--surface-border); }
.pp-thumbs { display: flex; gap: 0.6rem; margin-top: 0.8rem; overflow-x: auto; padding-bottom: 0.2rem; }
.pp-thumb { flex: 0 0 64px; height: 64px; padding: 0; border: 1px solid var(--surface-border); border-radius: 10px; overflow: hidden; background: var(--surface); cursor: pointer; opacity: 0.6; transition: opacity 0.2s ease, border-color 0.2s ease; }
.pp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-thumb:hover, .pp-thumb.is-active { opacity: 1; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.pp-info { background: var(--pp-tint); border: 1px solid var(--surface-border); border-radius: var(--radius); padding: 1.8rem 1.6rem; }
.pp-cat { display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; color: var(--accent); background: var(--pp-tint-strong); padding: 0.25rem 0.75rem; border-radius: 999px; margin: 0 0 0.7rem; }
.pp-info h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.25; margin: 0 0 0.8rem; }
.pp-price { font-size: 1.6rem; font-weight: 700; color: var(--accent); margin: 0 0 1.4rem; }
.pp-price s { font-weight: 400; color: var(--text-dim); margin-inline-end: 0.4rem; }
.pp-cta { display: block; width: 100%; text-align: center; }
.pp-cta { cursor: pointer; }
.pp-added { margin-top: 0.9rem; padding: 0.9rem 1rem; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 14px; background: var(--surface); }
.pp-added p { margin: 0 0 0.7rem; font-weight: 600; }
.pp-added__actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.pp-added__actions .btn { flex: 1 1 auto; text-align: center; }
.nav__left .icon-btn--cart { position: relative; }
.pp-note { font-size: 0.85rem; color: var(--text-dim); margin: 0.75rem 0 0; line-height: 1.6; }
.pp-desc { color: var(--text-dim); line-height: 1.8; margin: 1.8rem 0 0; padding-top: 1.6rem; border-top: 1px solid var(--surface-border); }

.pp-opt { margin-top: 1.6rem; }
.pp-opt h2 { font-size: 0.95rem; font-weight: 700; color: var(--accent); margin: 0 0 0.6rem; }
.pp-opt ul { list-style: none; padding: 0; margin: 0; color: var(--text-dim); font-size: 0.92rem; line-height: 1.7; }
.pp-swatches { display: flex; flex-wrap: wrap; gap: 0.45rem 1rem; }
.pp-swatches li { display: inline-flex; align-items: center; gap: 0.4rem; }
.pp-swatches i { width: 1rem; height: 1rem; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.15); background: var(--surface); display: inline-block; }

.pp-help { font-size: 0.9rem; color: var(--text-dim); margin: 2rem 0 0; }
.pp-help a { text-decoration: underline; text-underline-offset: 3px; }
.pp-sku { font-size: 0.78rem; color: var(--text-dim); margin: 0.5rem 0 0; }

.pp-faq { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--surface-border); }
.pp-faq h2 { font-size: 1.4rem; margin-bottom: 1.2rem; }
.pp-faq h2::after { content: ""; display: block; width: 3rem; height: 3px; border-radius: 3px; background: var(--accent); margin-top: 0.5rem; }
.pp-faq .faq__item[open] summary { color: var(--accent); }

.pp--empty { text-align: center; padding-top: 5rem; padding-bottom: 6rem; }
.pp--empty h1 { font-size: 1.4rem; margin-bottom: 1.5rem; }

@media (max-width: 760px) {
  .pp-main { grid-template-columns: 1fr; gap: 1.6rem; }
  .pp-media { position: static; }
  .pp-info { padding: 1.4rem 1.1rem; }
  .pp-top .pp-back { width: 100%; justify-content: center; }
}
