/* ─────────────────────────────────────────────
   shop.css — Merch storefront MVP
   Scoped to .shop-page (body class)
   Mirrors gold/purple Afro-futurist palette used on /rhind and /feeling
───────────────────────────────────────────── */

:root {
  --gold:        #d4a853;
  --gold-light:  #f0c060;
  --purple:      #1a0a2e;
  --purple-mid:  #2d1560;
  --purple-hi:   #7c3aed;
  --dark:        #07040f;
  --dark-mid:    #0a0612;
  --dark-card:   #0e0820;
  --text:        #f0ece8;
  --text-muted:  rgba(240, 236, 232, 0.6);
  --card-border: rgba(212, 168, 83, 0.15);
  --radius:      12px;
  --radius-lg:   20px;
  --gutter:      clamp(1rem, 4vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.shop-page {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  background: var(--dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(3rem, 8vw, 5rem) 0;
}

.section-title {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
  text-align: center;
}

/* ── Nav (reused structure from rhind.ejs / feeling.ejs) ── */
.feeling-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--gutter);
  background: rgba(7, 4, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 168, 83, 0.1);
}

.nav-logo {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--purple-hi) 100%);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 0 12px rgba(212, 168, 83, 0.4);
}

/* ── Shop header ── */
.shop-header {
  padding: calc(5rem + 60px) var(--gutter) 2rem;
  text-align: center;
}

.shop-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(212,168,83,0.4);
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.shop-title {
  font-size: clamp(2.8rem, 9vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(135deg, #fff 0%, var(--gold-light) 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

.shop-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 1.25rem;
  line-height: 1.7;
}

.checkout-note {
  font-size: 0.78rem;
  color: rgba(240,236,232,0.4);
  margin-top: 0.5rem;
}
.checkout-provider { color: var(--gold); font-weight: 700; }

/* ── Product grid ── */
.section { background: var(--dark); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.product-grid-sm { gap: 1rem; }

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--dark-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 168, 83, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.product-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--dark);
  overflow: hidden;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.product-card:hover .product-img { transform: scale(1.04); }

.product-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dark);
  background: var(--gold);
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
}

.product-info {
  padding: 1.25rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.product-grid-sm .product-title { font-size: 0.95rem; }

.product-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--card-border);
}

.product-price {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -0.01em;
}

/* ── Buy / cart buttons ── */
.buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold) 0%, var(--purple-hi) 100%);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.buy-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.buy-btn-sm { padding: 0.5rem 1rem; font-size: 0.75rem; letter-spacing: 0.04em; }
.buy-btn-block { width: 100%; padding: 0.95rem 1.8rem; font-size: 0.95rem; }

.cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem 1.6rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  letter-spacing: 0.03em;
}

.cart-btn:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
}

.cart-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Footer ── */
.feeling-footer {
  padding: 2.5rem 0;
  border-top: 1px solid rgba(212,168,83,0.1);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-logo {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(240,236,232,0.3);
}

/* ─────────────────────────────────────────────
   Product detail (shop-product.ejs)
───────────────────────────────────────────── */

.back-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.back-link a {
  color: var(--gold);
  transition: opacity 0.15s;
}
.back-link a:hover { opacity: 0.75; }

.product-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

/* Gallery */
.product-gallery { display: flex; flex-direction: column; gap: 0.75rem; }

.product-img-wrap-lg {
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  overflow: hidden;
  background: var(--dark-card);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.product-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.thumb-btn {
  padding: 0;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--dark-card);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.thumb-btn:hover { border-color: var(--gold); transform: translateY(-1px); }
.thumb-btn.active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(212,168,83,0.3); }

.thumb-img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  display: block;
}

/* Info block */
.product-info-block { display: flex; flex-direction: column; gap: 1rem; }

.product-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.product-detail-title {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
}

.product-detail-sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.product-detail-price {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -0.01em;
}

.product-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  padding-top: 0.75rem;
  border-top: 1px solid var(--card-border);
}

.size-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.size-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.size-radio {
  position: relative;
  cursor: pointer;
}

.size-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.size-radio-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.04);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.size-radio:hover .size-radio-label { border-color: var(--gold); color: var(--gold); }

.size-radio input[type="radio"]:checked + .size-radio-label {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(212,168,83,0.15), rgba(124,58,237,0.15));
  color: var(--gold);
}

.size-radio-stock {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.size-radio input[type="radio"]:checked ~ .size-radio-stock { opacity: 0.85; }

.size-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stock-note {
  font-size: 0.78rem;
  color: rgba(212,168,83,0.85);
  min-height: 1em;
}

.product-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

.checkout-note-sm {
  font-size: 0.78rem;
  color: rgba(240,236,232,0.35);
  margin-top: 0.5rem;
}

/* Other merch */
.other-merch { background: var(--dark-mid); }

/* ── Responsive ── */
@media (max-width: 800px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-layout { grid-template-columns: 1fr; }
  .product-thumbs { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
