/* ============================================================
   FordeeTV Shop — browse grid + detail page
   Reuses tokens from styles.css (--bg, --lime, --line, fonts…)
   ============================================================ */

/* ---------- shop section heading ---------- */
/* The grid below is full width, so don't cap the header at 60ch — let the title use
   the full width and sit on one line at its normal section-title size. The lead keeps
   its own readable max-width. */
.shop-section .section-head { max-width: none; }

/* spec badges under the heading (e.g. Native Metal · Apple Silicon only) */
.shop-badges { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.4rem; }
.shop-badges span {
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--lime); color: var(--lime);
  border-radius: 100px; padding: 0.34rem 0.8rem; white-space: nowrap;
}

/* ---------- browse controls: search + sort ---------- */
.shop-controls {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  margin-bottom: clamp(1.4rem, 3vw, 2rem);
}
.shop-search { position: relative; flex: 1 1 260px; max-width: 420px; }
.shop-search-icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--muted-2); pointer-events: none;
}
.shop-search input {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--text);
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 100px;
  padding: 0.8rem 1.2rem 0.8rem 2.7rem; transition: border-color .25s var(--ease);
}
.shop-search input::placeholder { color: var(--muted-2); }
.shop-search input:focus { outline: none; border-color: var(--lime); }
.shop-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.shop-sort { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--muted); font-size: 0.9rem; }
.shop-sort label { white-space: nowrap; }
.shop-sort select {
  font-family: var(--font-body); font-size: 0.95rem; color: var(--text); cursor: pointer;
  background-color: var(--bg-elev); border: 1px solid var(--line); border-radius: 100px;
  padding: 0.7rem 2.4rem 0.7rem 1.2rem;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238d8d86' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
  transition: border-color .25s var(--ease);
}
.shop-sort select:hover, .shop-sort select:focus { outline: none; border-color: var(--lime); }

.shop-empty { color: var(--muted); margin-top: 1.6rem; font-size: 1.02rem; }

@media (max-width: 560px) {
  .shop-controls { flex-direction: column; align-items: stretch; }
  .shop-search { max-width: none; }
  .shop-sort { justify-content: space-between; }
  .shop-sort select { flex: 1; }
}

/* ---------- browse grid ---------- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.6rem);
}
.shop-card {
  display: flex; flex-direction: column; gap: 0.9rem;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 18px;
  padding: clamp(0.9rem, 1.6vw, 1.1rem);
  transition: transform .4s var(--ease), border-color .4s var(--ease), background-color .4s;
}
.shop-card:hover { transform: translateY(-6px); border-color: var(--lime); background: var(--bg-elev-2); }
/* search/sort hides non-matches via the hidden attribute; this beats .shop-card's display:flex */
.shop-card[hidden] { display: none; }

/* squircle thumbnail: square tile, CSS-rounded (originals never edited) */
.shop-thumb {
  position: relative; aspect-ratio: 1 / 1; width: 100%;
  border-radius: 22%/22%;            /* squircle-ish superellipse approximation */
  overflow: hidden; background: var(--bg-elev-2);
}
.shop-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.shop-card-body { display: flex; flex-direction: column; gap: 0.4rem; padding: 0 0.3rem 0.3rem; }
.shop-card-name {
  font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em;
}
.shop-card-tagline { color: var(--muted); font-size: 0.95rem; }
.shop-card .tag { width: fit-content; margin-top: 0.2rem; }

/* ---------- FAQ link on browse page ---------- */
.shop-faq-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: clamp(2rem, 4vw, 3rem); font-weight: 600; color: var(--lime);
}
.shop-faq-link .arrow { transition: transform .3s var(--ease); }
.shop-faq-link:hover .arrow { transform: translateX(4px); }

/* ---------- FAQ page ---------- */
.faq-list { max-width: 760px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: clamp(1.1rem, 2.4vw, 1.5rem) 2.5rem clamp(1.1rem, 2.4vw, 1.5rem) 0;
  position: relative; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.1rem, 2vw, 1.35rem); letter-spacing: -0.01em; color: var(--text);
  transition: color .25s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; line-height: 1; color: var(--lime); transition: transform .3s var(--ease);
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item summary:hover { color: var(--lime); }
.faq-answer { padding: 0 0 clamp(1.1rem, 2.4vw, 1.5rem); color: var(--muted); max-width: 64ch; }

/* ---------- detail page ---------- */
.detail { max-width: 920px; }
.detail-hero { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.detail-art {
  aspect-ratio: 1 / 1; border-radius: 22%/22%; overflow: hidden; background: var(--bg-elev-2);
}
.detail-art img { width: 100%; height: 100%; object-fit: cover; }
.detail-name { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1; letter-spacing: -0.03em; }
.detail-tagline { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.3rem); margin-top: 0.8rem; }
.detail-price { color: var(--lime); font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; margin-top: 1rem; }
.detail-section { margin-top: clamp(2.5rem, 5vw, 4rem); }
.detail-section h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; margin-bottom: 1rem; }
.detail-desc { color: var(--text); max-width: 60ch; }
.detail-reqs { color: var(--muted-2); font-size: 0.9rem; margin-top: 1rem; letter-spacing: 0.03em; }
.detail-formats { color: var(--muted); font-size: 0.95rem; margin-top: 1rem; max-width: 60ch; }

/* commerce CTA (download / buy) — replaces the notify form on for-sale plugins */
.detail-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.4rem; }
.detail-vendor-note { color: var(--muted-2); font-size: 0.85rem; margin-top: 0.9rem; letter-spacing: 0.02em; }
.detail-manual { margin-top: 0.9rem; font-size: 0.95rem; color: var(--muted); }
.detail-manual a { color: var(--lime); font-weight: 600; }
.detail-manual a:hover { text-decoration: underline; }

/* "What it does" feature cards (audio plugins) */
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 0.4rem; }
.feature-card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 16px;
  padding: clamp(1.1rem, 2.2vw, 1.5rem);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.feature-card:hover { border-color: var(--lime); transform: translateY(-3px); }
.feature-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.6rem; }
.feature-icon { font-size: 1.5rem; line-height: 1; }
.feature-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; }
.feature-card p { color: var(--muted); font-size: 0.95rem; }
/* detail-page FAQ reuses the .faq-list / .faq-item styling from the FAQ page above */
.detail-section .faq-list { margin-top: 0.4rem; }
.detail-section .faq-answer { padding-top: 0; }
.detail-section .faq-answer a { color: var(--lime); font-weight: 600; }

/* video slot — reserved 16:9 box; placeholder until a YouTube ID exists */
.video-box { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: 14px; overflow: hidden; background: var(--bg-elev); border: 1px solid var(--line); }
.video-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted-2); font-size: 0.95rem; letter-spacing: 0.05em; text-transform: uppercase; }
.video-box iframe, .video-box img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; background: rgba(0,0,0,.25); transition: background-color .3s var(--ease); }
.video-play:hover { background: rgba(0,0,0,.1); }
.video-play::after { content: "▶"; color: #000; background: var(--lime); width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; padding-left: 4px; }

/* gallery — FCP control-panel screengrabs, varied/tall aspect ratios.
   Cap every image to the same modest width so none stretch to fill the column;
   heights stay natural. */
.gallery-grid { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.gallery-grid img {
  width: auto; max-width: min(100%, 460px);
  border-radius: 12px; border: 1px solid var(--line); background: var(--bg-elev);
}
/* full-width variant (audio plugins): stack screenshots edge to edge so they match
   the walkthrough video box width instead of the capped 460px screengrab layout */
.gallery-grid.gallery-full { flex-direction: column; flex-wrap: nowrap; }
.gallery-grid.gallery-full img { width: 100%; max-width: 100%; border-radius: 14px; }

/* notify CTA (the one swappable block) */
.notify { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 16px; padding: clamp(1.4rem, 3vw, 2rem); }
.notify form { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1rem; }
.notify input[type=email] {
  flex: 1; min-width: 220px; font-family: var(--font-body); font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 100px; padding: 0.9rem 1.2rem;
}
.notify input[type=email]:focus { outline: none; border-color: var(--lime); }
.shop-back { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--lime); font-weight: 600; margin-top: 3rem; }

@media (max-width: 900px) {
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-hero { grid-template-columns: 1fr; }
  .detail-art { max-width: 320px; }
}
@media (max-width: 600px) {
  .shop-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
}
