/* ================================================================
   Design 1 — Hero / Immersive
   Full-screen hero image, overlay details, scroll-down layout
   ================================================================ */

.product-hero-wrapper {
  position: relative;
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: #0a0a0d;
}

/* Blurred background image (like card design) */
.hero-blur-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-blur-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(60px) brightness(0) saturate(0.5);
  transform: scale(1.1);
}

/* ---- Hero image background ---- */
.product-hero-stage {
  position: relative;
  z-index: 1;
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  background: #000;
}

.product-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.85;
}

.product-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    #0c0c0d 0%,
    rgba(12, 12, 13, 0.8) 15%,
    rgba(12, 12, 13, 0.1) 60%,
    rgba(12, 12, 13, 0.3) 100%
  );
}

/* ---- Hero text ---- */
.product-hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem 2.5rem 2rem;
  max-width: 900px;
}

.product-hero-content .hero-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 1rem;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.product-hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.product-hero-content .hero-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: #4ade80;
}

/* ---- Hero CTA ---- */
.product-hero-cta-row {
  position: relative;
  z-index: 2;
  padding: 0 2.5rem 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #6366f1;
  color: white;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.hero-cta-primary:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.875rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.hero-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* ---- Scroll indicator ---- */
.hero-scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.3);
  font-size: 1.5rem;
  animation: hero-bounce 2s ease-in-out infinite;
}

@keyframes hero-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

.product-hero-detail {
  position: relative;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    #0c0c0d 160px
  );
  padding: 3rem 2.5rem;
}

#hero-description,
#hero-purchase {
  scroll-margin-top: 100px;
}

.product-hero-detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Description panel */
.hero-desc-panel h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f1f1f3;
  margin: 1.5rem 0 0.5rem;
}

.hero-desc-panel .hero-desc-body {
  color: #a1a1aa;
  font-size: 0.9375rem;
  line-height: 1.8;
}

/* Markdown heading overrides — # is white, ## is near-white, both with tight spacing */
.hero-desc-body h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  margin: 1.75rem 0 0.5rem;
  line-height: 1.25;
}

.hero-desc-body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #f1f1f3;
  margin: 1.25rem 0 0.4rem;
  line-height: 1.3;
}

.hero-desc-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #e4e4e7;
  margin: 1rem 0 0.35rem;
  line-height: 1.35;
}

/* Links inside markdown — remove browser blue, use accent */
.hero-desc-body a {
  color: #a5b4fc;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.hero-desc-body a:hover {
  color: #c7d2fe;
}

.hero-desc-body li { list-style: disc; margin-left: 1.25rem; padding: 3px 0; }
.hero-desc-body ul { margin-bottom: 1rem; }
.hero-desc-body p { margin-bottom: 0.75rem; }

/* Gallery — larger than the default 300px */
.hero-desc-panel #product-image-container {
  height: 420px;
  border-radius: 12px;
  border: 1px solid #27272a;
  background: #000;
}

/* Purchase panel */
.hero-purchase-panel {
  background: rgba(12, 12, 13, 0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.75rem;
  position: sticky;
  top: 80px;
  align-self: start;
}

.hero-purchase-panel .panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f1f3;
  margin-bottom: 1.25rem;
}

.hero-variant-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.hero-variant-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hero-variant-option:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

.hero-variant-option.selected {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.12);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

.hero-variant-option input[type="radio"] {
  accent-color: #6366f1;
  width: 18px;
  height: 18px;
}

.hero-variant-info {
  flex: 1;
  margin-left: 0.75rem;
}

.hero-variant-info .v-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f1f1f3;
}

.hero-variant-info .v-desc {
  font-size: 0.75rem;
  color: #71717a;
  margin-top: 2px;
}

.hero-variant-price {
  font-size: 1rem;
  font-weight: 700;
  color: #4ade80;
}

.hero-variant-stock {
  font-size: 0.6875rem;
  color: #52525b;
}

.hero-purchase-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hero-purchase-form input[type="email"],
.hero-purchase-form input[type="text"] {
  width: 100%;
  background: #27272a;
  border: 1px solid #3f3f46;
  color: #f1f1f3;
  padding: 0.625rem 0.875rem;
  border-radius: 8px;
  font-size: 0.875rem;
}

.hero-purchase-form input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.hero-purchase-form label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Payment method badges */
.hero-payment-badges {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.hero-payment-label {
  flex-basis: 100%;
  font-size: 0.6875rem;
  font-weight: 500;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.payment-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 42px;
  padding: 0 0.75rem;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: transform 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}

.payment-logo--apple-pay {
  width: 50px !important;
  height: auto !important;
  max-width: none !important;
}

.payment-logo--google-pay {
  width: 40px !important;
  height: auto !important;
  max-width: none !important;
}

.payment-logo--paypal-pay {
  width: 30px !important;
  height: auto !important;
  max-width: none !important;
}

.hero-checkout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #1e1b4b;
  color: white;
  border: none;
  padding: 0.875rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
  position: relative;
  overflow: hidden;
}

.hero-checkout-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.hero-checkout-btn:hover::after {
  transform: translateX(100%);
}

.hero-checkout-btn:hover {
  background: #312e81;
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.1);
}

.hero-payment-methods {
  text-align: center;
  font-size: 0.75rem;
  color: #52525b;
  margin-top: 0.5rem;
}

.hero-payment-methods-small{
  text-align: flex-start;
  font-size: 0.60rem;
  color: #52525b;
  margin-top: 0.5rem;
}
/* Back link */
.hero-back-link {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s;
}

.hero-back-link:hover {
  background: rgba(0, 0, 0, 0.7);
  color: white;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* Tablet — 860px */
@media (max-width: 860px) {
  .product-hero-wrapper {
    border-radius: 0;
  }

  .product-hero-stage {
    min-height: 50vh;
  }

  .product-hero-content {
    padding: 2rem 1.5rem 1.5rem;
  }

  .product-hero-content h1 {
    font-size: clamp(1.6rem, 7vw, 2.5rem);
  }

  .product-hero-content .hero-price {
    font-size: 1.35rem;
  }

  .product-hero-cta-row {
    padding: 0 1.5rem 1.5rem;
    flex-direction: column;
  }

  .hero-cta-primary,
  .hero-cta-secondary {
    width: 100%;
    justify-content: center;
  }

  .product-hero-detail {
    padding: 2rem 1.25rem 3rem;
  }

  .product-hero-detail-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-desc-panel {
    order: 1;
  }

  .hero-desc-panel #product-image-container {
    height: 280px;
  }

  .hero-purchase-panel {
    order: -1;
    position: static;
  }

  .hero-back-link {
    top: 0.75rem;
    left: 0.75rem;
    font-size: 0.75rem;
    padding: 0.4rem 0.75rem;
  }

  #hero-description,
  #hero-purchase {
    scroll-margin-top: 20px;
  }
}

/* Mobile — 480px */
@media (max-width: 480px) {
  .product-hero-stage {
    min-height: 45vh;
  }

  .product-hero-bg {
    opacity: 0.7;
  }

  .product-hero-content {
    padding: 1.5rem 1rem 1rem;
  }

  .product-hero-content h1 {
    font-size: 1.5rem;
  }

  .product-hero-content .hero-price {
    font-size: 1.15rem;
  }

  .hero-badge {
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  .product-hero-cta-row {
    padding: 0 1rem 1rem;
    gap: 0.5rem;
  }

  .hero-cta-primary,
  .hero-cta-secondary {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
  }

  .product-hero-detail {
    padding: 1.5rem 0.75rem 2rem;
  }

  .hero-desc-panel h2 {
    font-size: 1.1rem;
  }

  .hero-desc-panel .hero-desc-body {
    font-size: 0.85rem;
  }

  .hero-desc-panel #product-image-container {
    height: 220px;
    border-radius: 8px;
  }

  .hero-desc-panel {
    order: 1;
  }

  .hero-purchase-panel {
    order: -1;
    padding: 1rem;
    border-radius: 12px;
  }

  .hero-purchase-panel .panel-title {
    font-size: 0.85rem;
  }

  .hero-variant-option {
    padding: 0.625rem 0.75rem;
  }

  .hero-variant-info .v-name {
    font-size: 0.8rem;
  }

  .hero-variant-price {
    font-size: 0.875rem;
  }

  .hero-purchase-form input[type="email"],
  .hero-purchase-form input[type="text"] {
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
  }

  .hero-payment-badges {
    gap: 0.375rem;
  }

  .hero-payment-label {
    font-size: 0.625rem;
    margin-right: 0;
    width: 100%;
    text-align: left;
    margin-bottom: 0.125rem;
  }

  .payment-badge {
    width: 40px;
    height: 32px;
    padding: 0 0.375rem;
  }

  .payment-badge img {
    height: 16px;
  }

  .hero-checkout-btn {
    padding: 0.75rem;
    font-size: 0.9375rem;
  }

  .hero-scroll-hint {
    bottom: 0.75rem;
    font-size: 1.15rem;
  }
}

.thumb-strip {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  overflow-x: auto;
}

.hero-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.2s;
  flex-shrink: 0;
}

.hero-thumb:hover {
  opacity: 0.8;
  border-color: #52525b;
}

.hero-thumb.active {
  opacity: 1;
  border-color: #6366f1;
}

/* ================================================================
   Stripe Redirect Loading Overlay
   ================================================================ */

.stripe-loading-overlay {
  display: none; /* hidden until form submit */
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.stripe-loading-card {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2.5rem 3rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.stripe-loading-card p {
  color: #d4d4d8;
  font-size: 1.05rem;
  font-weight: 500;
  margin-top: 1.25rem;
}

/* Spinner */
.stripe-loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: stripe-spin 0.7s linear infinite;
}

@keyframes stripe-spin {
  to { transform: rotate(360deg); }
}
