/* Shop styles. Builds on /styles.css tokens (dark + gold, Satoshi). */

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}
.shop-loading, .shop-note { color: var(--text-mute); grid-column: 1 / -1; }
.shop-note a { color: var(--gold-hi); }

.product {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
  scroll-margin-top: 6rem;
}
.product:hover, .product.flash { border-color: var(--gold-line); }
.product:hover { transform: translateY(-3px); }

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-elev-2);
  overflow: hidden;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media.placeholder {
  display: grid;
  place-items: center;
  background:
    radial-gradient(60% 60% at 70% 20%, rgba(201,155,74,0.16), transparent 70%),
    var(--bg-elev-2);
}
.product-media.placeholder .ph-name {
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.04em;
  color: var(--gold-hi);
  opacity: 0.85;
  padding: 0 1rem;
  text-align: center;
  line-height: 1;
}
.product-badge {
  position: absolute;
  top: 0.9rem; left: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(11,11,10,0.78);
  border: 1px solid var(--gold-line);
  color: var(--gold-hi);
  backdrop-filter: blur(8px);
}

.product-body {
  padding: 1.4rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}
.product-body h3 { font-size: 1.35rem; letter-spacing: -0.025em; }
.product-body .tagline { color: var(--text-mute); font-size: 0.95rem; line-height: 1.55; }
.product-foot {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.price { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.price.soon { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }

.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-sm { padding: 0.65rem 1.15rem; font-size: 0.86rem; }

/* How it works */
.shop-steps {
  list-style: none;
  margin-top: clamp(3rem, 7vw, 5rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
}
.shop-steps li {
  padding: 1.5rem 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--text-mute);
  font-size: 0.95rem;
}
.shop-steps li + li { padding-left: 1.5rem; border-left: 1px solid var(--border); }
.shop-steps strong { color: var(--text); font-size: 1.05rem; letter-spacing: -0.01em; }
.step-num { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em; color: var(--gold); }

/* Buy dialog */
.buy-dialog {
  margin: auto;
  width: min(920px, 94vw);
  max-height: 92svh;
  overflow: auto;
  background: var(--bg-elev-1);
  color: var(--text);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 0;
}
.buy-dialog::backdrop { background: rgba(5,5,4,0.72); backdrop-filter: blur(6px); }
.buy-close-form { position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2; }
.buy-close {
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  border: 1px solid var(--border-hi);
  background: rgba(11,11,10,0.7);
}
.buy-close:hover { border-color: var(--gold-line); color: var(--gold-hi); }
.buy-body { display: grid; grid-template-columns: 1fr 1fr; }
.buy-media { background: var(--bg-elev-2); min-height: 320px; }
.buy-media .product-media { aspect-ratio: auto; height: 100%; min-height: 320px; }
.buy-form { padding: 2rem 2rem 2.2rem; display: flex; flex-direction: column; gap: 1.1rem; }
.buy-form h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.03em; }
.buy-desc { color: var(--text-mute); font-size: 0.95rem; line-height: 1.6; }

.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
.field input[type="text"], .field select, .qty input {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.95rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  font: inherit;
}
.field input:focus-visible, .field select:focus-visible, .qty input:focus-visible, .qty button:focus-visible, .buy-close:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.field .hint { font-size: 0.78rem; color: var(--text-faint); display: flex; justify-content: space-between; }
.preview {
  font-style: italic;
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  color: var(--gold-hi);
  min-height: 2.1rem;
  word-break: break-word;
}
.qty { display: inline-flex; align-items: stretch; width: 150px; }
.qty button {
  width: 46px;
  border: 1px solid var(--border-hi);
  font-size: 1.2rem;
}
.qty button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.qty button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.qty button:hover { border-color: var(--gold-line); color: var(--gold-hi); }
.qty input { text-align: center; border-radius: 0; border-left: 0; border-right: 0; padding: 0; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.buy-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--border); padding-top: 1rem; color: var(--text-mute); }
.buy-total strong { color: var(--text); font-size: 1.4rem; letter-spacing: -0.02em; }
.buy-fine { font-size: 0.8rem; color: var(--text-faint); margin-top: -0.4rem; }
.buy-error { color: #E8837A; font-size: 0.9rem; }
.buy-submit { justify-content: center; width: 100%; }
.buy-submit[disabled] { opacity: 0.6; cursor: progress; }

@media (max-width: 880px) {
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .shop-grid { grid-template-columns: 1fr; }
  .shop-steps { grid-template-columns: 1fr; }
  .shop-steps li, .shop-steps li + li { padding: 1.25rem 0; border-left: 0; border-bottom: 1px solid var(--border); }
  .buy-body { grid-template-columns: 1fr; }
  .buy-media, .buy-media .product-media { min-height: 0; aspect-ratio: 4 / 3; height: auto; }
  .buy-form { padding: 1.5rem 1.25rem 1.75rem; }
}

/* Home page teaser */
.shop-teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.shop-teaser-grid .card { min-height: 150px; }
.shop-teaser-grid h3 { font-size: 1.3rem; letter-spacing: -0.025em; margin-bottom: 0.4rem; }
.shop-teaser-grid .desc { color: var(--text-mute); font-size: 0.93rem; }
.shop-teaser-cta { margin-top: 2rem; }
@media (max-width: 760px) { .shop-teaser-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .product, .product:hover { transition: none; transform: none; }
}
