/* store/store.css — store page + cart drawer. Builds on assets/site.css. */

.page { max-width: 980px; }

.store-intro { max-width: 640px; margin-left: auto; margin-right: auto; text-align: center; }
.store-intro .muted { margin-top: 8px; }

.on-photo-heading h2 { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.7); }

/* --- PRODUCT GRID --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 44px;
}

.product {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 0;
}

.product-media { position: relative; }
.product-media .frame { aspect-ratio: 1 / 1; }
/* Prints are landscape 8×10s: 5:4 frame, whole image shown (Groovin' Along
   is a little wider than 5:4, so it letterboxes rather than crops). */
.product-media .frame.frame--print { aspect-ratio: 5 / 4; }
.frame--print img { object-fit: contain; background: #fff; }

.product-media--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1b1612;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 12px;
  font-size: 1.05rem;
}

.product-media--grid .cover-placeholder { font-size: 0.8rem; }

.badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: var(--gradient);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 6px 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.product-name { font-size: 1.1rem; font-weight: 800; line-height: 1.2; }
.product-price { font-size: 1.05rem; font-weight: 700; color: var(--gold); margin-top: 4px; }
.product-blurb { font-size: 0.9rem; white-space: pre-line; }

.option { border: 0; }
.option--checks { display: flex; flex-direction: column; gap: 8px; }
.option legend { margin-bottom: 8px; }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  cursor: pointer;
}

.check input { width: 18px; height: 18px; accent-color: var(--gold); flex-shrink: 0; }

.product-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.low-stock { color: var(--orange); font-weight: 700; text-align: center; }

.is-soldout .product-media { opacity: 0.55; }

/* Name your price (same picker as the /lps track pages) */
.tier-selector { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 6px; }
.tier-btn {
  background: #fff;
  border: 1px solid var(--ink-soft);
  color: var(--ink);
  padding: 10px 0;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.tier-btn:hover { border-color: var(--gold); }
.tier-btn.active { background: var(--gradient); border-color: transparent; }
.pwyw .field-input { margin-top: 8px; }

/* Class rules that set display (.suggestion, .pill, ...) beat the [hidden]
   attribute; make hidden always win on this page. */
[hidden] { display: none !important; }

/* Info-only card (Groovin' Along: EP-only, no single) */
.product-price--note { font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }
.product--info .btn-secondary { text-align: center; }
.section-heading { scroll-margin-top: 24px; }

/* --- CART TOGGLE --- */
.cart-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 40;
  cursor: pointer;
  font-family: var(--font);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}

.cart-count {
  display: inline-block;
  min-width: 1.4em;
  margin-left: 4px;
  padding: 1px 5px;
  background: var(--ink);
  color: #fff;
  text-align: center;
}

.cart-toggle[hidden] { display: none; }   /* .pill sets display, which beats [hidden] */
.cart-toggle.bump { animation: bump 0.35s ease; }
.cart-close:focus:not(:focus-visible) { outline: none; }
@keyframes bump { 50% { transform: scale(1.12); } }

/* --- CART DRAWER --- */
.cart-scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 8, 6, 0.5);
}

.cart {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  width: min(420px, 100vw);
  background: var(--card);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  visibility: hidden;
}

.cart.open { transform: none; visibility: visible; }

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--rule);
}

.cart-head h2 { font-size: 1.05rem; font-weight: 800; }

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-lines { list-style: none; display: flex; flex-direction: column; gap: 14px; }

.cart-line {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.cart-line .frame { width: 56px; height: 56px; padding: 2px; }
.cart-line .cover-placeholder { font-size: 0.5rem; padding: 4px; }

.cart-line-name { font-weight: 700; font-size: 0.9rem; line-height: 1.25; }
.cart-line-desc { font-size: 0.78rem; color: var(--ink-muted); margin-top: 2px; }
.cart-line-amount { font-weight: 700; font-size: 0.9rem; text-align: right; }

.qty {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  border: 1px solid var(--rule);
}

.qty button {
  width: 28px;
  height: 28px;
  border: 0;
  background: #faf6ee;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.qty button:hover { background: var(--gold-light); }
.qty span { min-width: 28px; text-align: center; font-size: 0.85rem; font-weight: 700; }

.cart-line .remove { font-size: 0.75rem; margin-top: 8px; display: block; margin-left: auto; }

.suggestion {
  border: 2px dashed var(--gold);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}

.suggestion .btn-secondary { align-self: flex-start; }

.cart-foot {
  border-top: 1px solid var(--rule);
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.totals {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  font-size: 0.9rem;
}

.totals dd { text-align: right; font-weight: 700; }

.cart.loading .cart-foot { opacity: 0.6; }

/* --- CART UPSELL (small offer in the drawer) --- */
.upsell {
  background: #faf6ee;
  border: 1px solid var(--gold-light);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}
.upsell-head { display: flex; align-items: center; justify-content: space-between; }
.upsell-head .text-link { font-size: 0.72rem; }
.upsell-title { font-weight: 800; }
.upsell .btn-secondary { align-self: flex-start; }

/* --- MODALS (checkout offer + Stripe) --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(10, 8, 6, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--card);
  padding: 24px;
  box-shadow: 0 0 28px 6px var(--glow);
}

.offer-card { display: flex; flex-direction: column; gap: 12px; text-align: center; }
.offer-card .eyebrow { color: var(--orange); }
.offer-title { font-size: 1.35rem; font-weight: 800; line-height: 1.2; }
.offer-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 4px 0; }
.offer-options--single { grid-template-columns: minmax(0, 220px); justify-content: center; }
.offer-option {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 2px solid var(--rule);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  transition: border-color 0.15s;
}
.offer-option:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 10px var(--glow); }
.offer-option input { position: absolute; opacity: 0; pointer-events: none; }
.offer-option .frame { aspect-ratio: 1 / 1; padding: 0; }
.offer-option .frame.frame--print { aspect-ratio: 5 / 4; }
.offer-option .cover-placeholder { font-size: 0.65rem; }
.offer-options--single .offer-option { cursor: default; }
.offer-price { font-size: 1.4rem; font-weight: 800; }
.offer-price s { color: var(--ink-muted); font-weight: 600; font-size: 1rem; margin-right: 6px; }
.offer-price span { color: var(--gold); }
.offer-card .text-link { font-size: 0.82rem; }

.checkout-card { padding: 20px 24px 24px; }
.checkout-close { float: right; margin-bottom: 14px; padding: 7px 12px; }
#stripe-embed-target { clear: both; width: 100%; }

/* --- THANK-YOU PAGE --- */
.thanks { display: flex; flex-direction: column; gap: 16px; }
.thanks .section-heading { margin-bottom: 0; }
.thanks-lede { text-align: center; }
.thanks-lines { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.thanks-lines li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.thanks-block { border-top: 1px solid var(--rule); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 0.92rem; }
.code-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.code-row code { font-weight: 800; letter-spacing: 0.06em; background: #faf6ee; padding: 2px 8px; }
.thanks .btn-secondary, .thanks .btn { align-self: center; }

/* --- PHONES --- */
@media (max-width: 720px) {
  .product-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 640px) {
  /* Bottom-right on phones: thumb reach, and clear of the wordmark */
  .cart-toggle { top: auto; bottom: 16px; right: 16px; padding: 12px 16px; font-size: 0.8rem; }
}
