/* ==========================================================================
   Falcon Gaming — catalog surfaces (all_products, product_detail, steamunlock)
   Depends on falcon.css tokens. Load AFTER falcon.css.
   ========================================================================== */

/* ------- shared page frame ------- */
.catalog { padding-block: clamp(40px, 6vw, 72px) clamp(56px, 8vw, 96px); }
.catalog-head { max-width: 680px; margin-bottom: clamp(28px, 4vw, 40px); }
.catalog-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05; letter-spacing: -0.02em; color: var(--ink);
}
.catalog-head p { margin: 14px 0 0; font-size: 1.05rem; color: var(--muted); max-width: 52ch; }

.crumb { margin-bottom: 22px; }
.crumb a { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
.crumb a:hover { color: var(--primary); }

/* ------- search + filters (Page A) ------- */
.catalog-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 28px; }
.catalog-search { position: relative; flex: 1 1 320px; max-width: 480px; }
.catalog-search .search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 15px; color: var(--muted-soft); pointer-events: none; opacity: .8;
}
.catalog-search #productSearch { padding-left: 40px; }

.filter-container { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn {
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  color: var(--muted); background: transparent; border: 1px solid var(--hairline);
  padding: 9px 15px; border-radius: var(--r-pill); cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.filter-btn:hover { color: var(--ink); background: var(--surface-card); }
.filter-btn.active { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }

/* ------- game grid (Page A) ------- */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card {
  background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--r-lg);
  overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: transparent; }
.product-card.hidden-initially { display: none !important; }
.product-link { display: block; color: inherit; }
.product-link:hover { color: inherit; }
.product-image { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-strong); }
.product-img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .product-img { transform: scale(1.05); }
.product-img.lazy-load { opacity: 0; }
.product-header { padding: 14px 16px 18px; }
.product-name {
  font-family: var(--font-display); font-size: 1.2rem; line-height: 1.25;
  color: var(--ink); letter-spacing: -0.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-edition { margin: 5px 0 0; font-size: 13px; color: var(--primary); font-weight: 600; }

.products-count { margin-top: 28px; text-align: center; }
.products-count p { font-size: 14px; color: var(--muted); margin: 0; }

.show-more-container { display: none; justify-content: center; margin-top: 32px; }
.show-more-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  background: var(--canvas); color: var(--ink); border: 1px solid var(--hairline);
  padding: 13px 24px; border-radius: var(--r-md); cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}
.show-more-btn:hover { background: var(--surface-card); }
.show-more-btn .btn-icon { font-size: 11px; color: var(--muted); }

/* empty / error states */
.state-block { text-align: center; padding: clamp(48px, 8vw, 88px) 24px; }
.state-block .state-icon { font-size: 40px; margin-bottom: 12px; }
.state-block h3 { font-family: var(--font-display); font-size: 1.8rem; color: var(--ink); margin-bottom: 8px; }
.state-block p { color: var(--muted); margin: 0; }

/* help card (Page A) */
.help-section { margin-top: clamp(48px, 7vw, 72px); }
.help-card { background: var(--surface-card); border-radius: var(--r-lg); padding: clamp(28px, 4vw, 40px); }
.help-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.help-header .help-icon { font-size: 24px; }
.help-header h3 { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); }
.help-content p { color: var(--muted); margin: 0 0 20px; max-width: 60ch; }
.help-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.help-link {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--r-md);
  padding: 11px 18px; font-size: 14px; font-weight: 600; color: var(--ink);
  transition: background .16s ease, color .16s ease;
}
.help-link:hover { background: var(--surface-soft); color: var(--primary); }

/* ==========================================================================
   Product detail (Page B)
   ========================================================================== */
.pd { padding-block: clamp(28px, 4vw, 44px) clamp(56px, 8vw, 96px); }
.pd-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

/* left media */
.pd-media { position: sticky; top: 88px; }
.pd-cover {
  border-radius: var(--r-xl); overflow: hidden; background: var(--dark);
  border: 1px solid var(--hairline); box-shadow: var(--shadow-lift);
  aspect-ratio: 16 / 10; display: grid; place-items: center; position: relative;
}
.pd-cover img { width: 100%; height: 100%; object-fit: cover; }
.pd-cover .image-placeholder {
  position: absolute; inset: 0; display: none; flex-direction: column; gap: 10px;
  align-items: center; justify-content: center; color: var(--on-dark-soft); text-align: center;
}
.pd-cover.image-error .image-placeholder { display: flex; }
.pd-cover .placeholder-icon { font-size: 48px; }
.pd-cover .placeholder-text { font-family: var(--font-display); font-size: 1.6rem; color: var(--on-dark); }
.discord-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: 16px; padding: 13px 22px; border-radius: var(--r-md);
  background: #5865F2; color: #fff; font-family: var(--font-body); font-weight: 600; font-size: 15px;
  transition: background .16s ease;
}
.discord-btn:hover { background: #4752c4; color: #fff; }
.discord-btn .discord-icon { flex: 0 0 auto; }

/* right info */
.pd-info { }
.pd-title { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 6px; }
.pd-eyebrow { font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); margin: 0 0 14px; }

.variation-selector { display: flex; flex-direction: column; gap: 12px; margin: 26px 0; }
.variation-option { position: relative; }
.variation-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.variation-label {
  display: block; cursor: pointer;
  background: var(--canvas); border: 1.5px solid var(--hairline); border-radius: var(--r-lg);
  padding: 16px 18px; transition: border-color .16s ease, background .16s ease;
}
.variation-label:hover { border-color: var(--muted-soft); }
.variation-option input:checked + .variation-label {
  border-color: var(--primary); background: var(--surface-soft);
  box-shadow: 0 0 0 3px rgba(204,120,92,.14);
}
.variation-info { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.variation-name { font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--ink); }
.variation-price { font-family: var(--font-body); font-size: 1.2rem; font-weight: 700; color: var(--primary); white-space: nowrap; }
.variation-price.unavailable { color: var(--muted); font-size: 14px; font-weight: 500; }

.purchase-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.add-to-cart-btn-main, .buy-now-btn-main {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1;
  padding: 16px 24px; border-radius: var(--r-md); border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, background .16s ease, border-color .16s ease;
}
.add-to-cart-btn-main:active, .buy-now-btn-main:active { transform: translateY(1px); }
.buy-now-btn-main { background: var(--primary); color: var(--on-primary); }
.buy-now-btn-main:hover { background: var(--primary-active); }
.add-to-cart-btn-main { background: var(--canvas); color: var(--ink); border-color: var(--hairline); }
.add-to-cart-btn-main:hover { background: var(--surface-card); }

/* tabs */
.product-tabs-section { margin-top: clamp(48px, 7vw, 72px); }
.tab-headers { display: flex; gap: 6px; border-bottom: 1px solid var(--hairline); margin-bottom: 28px; }
.tab-header {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--muted);
  background: transparent; border: none; border-bottom: 2px solid transparent;
  padding: 12px 8px; margin-bottom: -1px; cursor: pointer; transition: color .16s ease, border-color .16s ease;
}
.tab-header:hover { color: var(--ink); }
.tab-header.active { color: var(--ink); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

.variation-detail-card { padding: 4px 0 8px; }
.variation-detail-title { font-family: var(--font-display); font-size: 1.7rem; color: var(--ink); margin-bottom: 10px; }
.variation-detail-description { color: var(--body); margin: 0 0 22px; max-width: 70ch; }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.detail-heading { font-family: var(--font-body); font-size: 14px; font-weight: 700; letter-spacing: .02em; color: var(--ink); margin-bottom: 12px; }
.features-list, .requirements-list { list-style: none; margin: 0; padding: 0; }
.features-list li, .requirements-list li {
  position: relative; padding-left: 22px; margin-bottom: 9px; font-size: 14px; color: var(--body); line-height: 1.5;
}
.features-list li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.requirements-list li::before { content: "•"; position: absolute; left: 4px; color: var(--primary); font-weight: 700; }
.variation-divider { border: none; border-top: 1px solid var(--hairline); margin: 28px 0; }

.faq-content { display: grid; gap: 4px; max-width: 780px; }
.faq-item { padding: 20px 0; border-bottom: 1px solid var(--hairline-soft); }
.faq-item:last-child { border-bottom: none; }
.faq-question { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); margin-bottom: 8px; }
.faq-answer { color: var(--muted); margin: 0; max-width: 70ch; }

/* ==========================================================================
   SteamUnlock detail (Page C)
   ========================================================================== */
.su-page { padding-block: clamp(32px, 5vw, 56px) clamp(56px, 8vw, 96px); }
.su-hero { text-align: center; max-width: 720px; margin: 0 auto clamp(36px, 5vw, 52px); }
.su-hero .badge-coral {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 13px; border-radius: var(--r-pill); background: var(--primary); color: var(--on-primary);
  margin-bottom: 18px;
}
.su-hero .product-title { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1.04; letter-spacing: -0.02em; color: var(--ink); }
.su-hero .product-subtitle { margin: 14px 0 0; font-size: 1.15rem; color: var(--muted); }

.main-panels { display: grid; grid-template-columns: 1.3fr .9fr; gap: clamp(28px, 4vw, 44px); align-items: start; }

/* left details */
.details-panel { }
.detail-section { display: flex; flex-direction: column; gap: 14px; }
.feature-item {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--surface-card); border-radius: var(--r-lg); padding: 18px 20px;
}
.feature-icon {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: var(--r-md);
  display: grid; place-items: center; background: var(--canvas); font-size: 20px;
}
.feature-text { font-family: var(--font-body); font-size: 15px; font-weight: 700; color: var(--ink); }
.feature-desc { margin-top: 3px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.error-message { background: var(--surface-card); border-radius: var(--r-lg); padding: 24px; }
.error-message h3 { font-family: var(--font-display); color: var(--ink); margin-bottom: 6px; }
.error-message p { color: var(--bad); margin: 0; }

/* right payment card */
.payment-panel { position: sticky; top: 88px; }
.payment-card { background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--r-xl); padding: clamp(24px, 3vw, 32px); box-shadow: var(--shadow-lift); }
.price-section { text-align: center; padding-bottom: 20px; border-bottom: 1px solid var(--hairline); margin-bottom: 22px; }
.price-label { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }
.price-amount { font-family: var(--font-display); font-size: clamp(2.6rem, 6vw, 3.4rem); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); line-height: 1; margin: 8px 0 4px; }
.price-note { font-size: 13px; color: var(--muted); }

.email-section { margin-bottom: 20px; }
.email-label, .quantity-label { display: block; font-size: 14px; font-weight: 600; color: var(--body-strong); margin-bottom: 8px; }
.email-input { width: 100%; }
.email-note { margin-top: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

.quantity-section { margin-bottom: 20px; }
.quantity-controls { display: flex; align-items: center; gap: 10px; }
.quantity-btn {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: var(--r-md);
  background: var(--canvas); border: 1px solid var(--hairline); color: var(--ink);
  font-size: 20px; font-weight: 600; cursor: pointer; transition: background .16s ease;
}
.quantity-btn:hover { background: var(--surface-card); }
.quantity-input { width: 100%; text-align: center; font-weight: 600; }
/* hide native number spinners for a cleaner control */
.quantity-input::-webkit-outer-spin-button, .quantity-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.quantity-input { -moz-appearance: textfield; }

.total-section { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; border-top: 1px solid var(--hairline); margin-bottom: 22px; }
.total-label { font-size: 15px; font-weight: 600; color: var(--body-strong); }
.total-amount { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; color: var(--primary); letter-spacing: -0.01em; }

.action-buttons { display: flex; flex-direction: column; gap: 12px; }
.add-to-cart-btn, .buy-now-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1;
  padding: 16px 24px; border-radius: var(--r-md); border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, background .16s ease, border-color .16s ease, opacity .16s ease;
}
.add-to-cart-btn:active, .buy-now-btn:active { transform: translateY(1px); }
.buy-now-btn { background: var(--primary); color: var(--on-primary); }
.buy-now-btn:hover { background: var(--primary-active); }
.add-to-cart-btn { background: var(--canvas); color: var(--ink); border-color: var(--hairline); }
.add-to-cart-btn:hover { background: var(--surface-card); }

.security-note { margin-top: 18px; text-align: center; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.security-note .security-icon { font-size: 18px; }
.security-note strong { color: var(--body-strong); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .pd-layout { grid-template-columns: 1fr; }
  .pd-media { position: static; }
  .main-panels { grid-template-columns: 1fr; }
  .payment-panel { position: static; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .details-grid { grid-template-columns: 1fr; gap: 20px; }
  .catalog-tools { flex-direction: column; align-items: stretch; }
  .catalog-search { max-width: none; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
}
