/* ═══════════════════════════════════════════════════════════════
   RACEATRONICS — Apple Product Configurator Style
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  --bg: #ffffff;
  --bg-viewer: #d1d1d6;
  --text: #1d1d1f;
  --text-light: #6e6e73;
  --text-faint: #86868b;
  --border: #d2d2d7;
  --border-light: #e8e8ed;
  --accent: #0071e3;
  --radius: 12px;
}

html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.47059;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 3px; }
* { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.12) transparent; }

/* ── Loading ─────────────────────────────────────────────────── */
.loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  transition: opacity 0.6s ease;
}
.loading-content { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.loading-logo { font-size: 1.4rem; font-weight: 700; letter-spacing: 0.08em; color: var(--text); }
.loading-tagline { font-size: 0.8125rem; color: var(--text-light); }
.loading-bar { width: 200px; height: 3px; background: #e8e8ed; border-radius: 2px; overflow: hidden; margin-top: 2px; }
.loading-progress { height: 100%; width: 0%; border-radius: 2px; background: var(--accent); transition: width 0.3s ease; }
.loading-percent { font-size: 0.6875rem; font-weight: 500; color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* ── Header ──────────────────────────────────────────────────── */
.header {
  position: fixed; top: 0; left: 0; width: 100%;
  z-index: 2005; /* On top of transition overlay (z-index 2000) */
  display: flex; flex-direction: column;
  background: rgba(255,255,255,0.76);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  opacity: 1 !important; /* Persistent the whole time */
  pointer-events: auto !important;
  overflow: hidden; /* Prevent F1 car from displaying offscreen */
}
.header-inner {
  width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between;
  height: 48px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}
.header-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  clip-path: inset(0 0 0 100%);
}
.header-brand { text-decoration: none; }
.header-brand-text { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.05em; color: var(--text); }
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
}

.header-hero-price,
.header-builder-price,
.header-separator {
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

.header-hero-price,
.header-separator {
  color: var(--text-light);
}

.header-builder-price {
  color: var(--text);
  font-weight: 600;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-cta {
  background: var(--accent); color: #fff; border: none;
  padding: 4px 14px; border-radius: 980px;
  font-size: 0.75rem; font-weight: 500; cursor: pointer;
  transition: background-color 0.2s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.header-cta:hover { background-color: #0077ed; transform: scale(1.02); }
.header-cta:active { transform: scale(0.98); }

/* Hero Mode (when on scroll animation) */
.header.hero-mode .header-left {
  opacity: 0;
  pointer-events: none;
}

.header.hero-mode .header-builder-price {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.header.hero-mode .header-cta {
  opacity: 0;
  transform: scale(0.9) translateX(10px);
  pointer-events: none;
}

/* Builder Mode (when on customizer) */
.header:not(.hero-mode) .header-left {
  opacity: 1;
  pointer-events: auto;
  animation: f1-reveal-text 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.header:not(.hero-mode) .header-builder-price {
  opacity: 1;
  transform: translateY(0);
}

.header:not(.hero-mode) .header-cta {
  opacity: 1;
  transform: scale(1) translateX(0);
  pointer-events: auto;
}

/* Centered brand name and price in Hero Mode */
.header-center {
  display: flex;
  align-items: baseline;
  gap: 12px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.header.hero-mode .header-center {
  opacity: 1;
  pointer-events: auto;
}
.header:not(.hero-mode) .header-center {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.95);
  pointer-events: none;
}

/* ── F1 Car Animation ────────────────────────────────────────── */
.f1-car-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scaleX(-1); /* Face left by default */
  width: 90px;
  height: 30px;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Wheel pivots */
.f1-wheel-rear {
  transform-origin: 30px 28px;
}
.f1-wheel-front {
  transform-origin: 90px 28px;
}

/* Animations active when we transition to builder mode */
.header:not(.hero-mode) .f1-car-container {
  animation: f1-drive-left 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.header:not(.hero-mode) .f1-wheel-rear,
.header:not(.hero-mode) .f1-wheel-front {
  animation: f1-wheel-spin 0.2s linear infinite;
}

@keyframes f1-drive-left {
  0% {
    left: 50%;
    transform: translate(-50%, -50%) scaleX(-1) scale(0.9);
    opacity: 0;
  }
  15% {
    left: 50%;
    transform: translate(-50%, -50%) scaleX(-1) scale(1);
    opacity: 1;
  }
  30% {
    left: 50%;
    transform: translate(-50%, -50%) scaleX(-1) scale(1);
    opacity: 1;
  }
  100% {
    left: -150px; /* Drive fully offscreen to the left */
    transform: translate(0, -50%) scaleX(-1) scale(1);
    opacity: 1;
  }
}

@keyframes f1-wheel-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes f1-reveal-text {
  0% {
    clip-path: inset(0 0 0 100%);
  }
  65% {
    clip-path: inset(0 0 0 100%);
  }
  78% {
    clip-path: inset(0 0 0 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}

/* ── Apple Info Strip ─────────────────────────────────────────── */
.info-strip {
  background: rgba(245, 245, 247, 0.76);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 24px;
  width: 100%;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.info-strip-inner {
  width: 100%; max-width: 1440px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr);
  text-align: center; gap: 16px;
}
.info-item { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.72rem; color: var(--text-light); }
.info-icon { font-size: 0.9rem; }

/* Hide info-strip on Hero section and Checkout/Confirmation pages */
.header.hero-mode .info-strip,
.header.checkout-mode .info-strip {
  display: none;
}

/* Adjust top margins when info-strip is hidden */
.header.checkout-mode ~ #checkout-section,
.header.checkout-mode ~ #confirmation-section {
  margin-top: 48px;
  min-height: calc(100vh - 48px);
}


/* ── Hero Scroll Section ──────────────────────────────────────── */
.hero-scroll-section {
  position: relative;
  height: 300vh; /* Scroll track length */
  background: #ffffff;
  width: 100%;
}
.hero-sticky-container {
  position: fixed;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.hero-video, .hero-canvas {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%; min-height: 100%;
  width: auto; height: auto;
  object-fit: cover;
  z-index: 1;
}
.hero-glow-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.85) 100%);
  z-index: 2; pointer-events: none;
}
.hero-text-overlay {
  position: absolute;
  width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 3; pointer-events: none;
  font-weight: 900; text-transform: uppercase; font-style: italic;
  letter-spacing: -0.04em; line-height: 0.85;
  font-size: clamp(2.5rem, 8.5vw, 6.5rem);
  color: #fff;
  opacity: 0; /* Animated via scroll */
  transition: opacity 0.1s linear;
}
.hero-text-left {
  align-self: center; text-align: center;
  background: linear-gradient(90deg, #ffffff 30%, #a3a3a3 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 0.1em;
  transform: translateX(-150vw);
}
.hero-text-right {
  align-self: center; text-align: center;
  background: linear-gradient(90deg, #ff3b30 0%, #ff9500 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  transform: translateX(150vw);
}
.scroll-indicator {
  position: absolute; bottom: 40px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 0.75rem; color: rgba(255,255,255,0.5); font-weight: 500;
  z-index: 4; pointer-events: none;
  transition: opacity 0.3s;
}
.scroll-arrow {
  width: 14px; height: 14px;
  border-bottom: 2px solid rgba(255,255,255,0.5);
  border-right: 2px solid rgba(255,255,255,0.5);
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(45deg); }
  40% { transform: translateY(-6px) rotate(45deg); }
  60% { transform: translateY(-3px) rotate(45deg); }
}

/* White background fade overlay during transition */
.hero-sticky-container::after {
  content: "";
  position: absolute; inset: 0;
  background: #ffffff;
  z-index: 5;
  opacity: var(--fade-opacity, 0);
  pointer-events: none;
  transition: opacity 0.1s linear;
}

/* ── Layout ──────────────────────────────────────────────────── */
.main-content {
  display: grid; grid-template-columns: 1fr 440px;
  min-height: calc(100vh - 80px); max-width: 1440px; margin: 80px auto 0;
  position: relative;
  opacity: 0; /* Fades in on scroll */
  transition: opacity 0.5s ease;
}
.main-content::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100vw;
  height: 1px;
  background-color: var(--border-light);
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}

/* Viewer */
.viewer-section {
  position: sticky; top: 80px; height: calc(100vh - 80px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px; overflow: hidden;
}
.viewer-container {
  position: relative; width: 100%; height: 100%;
  border-radius: 18px; overflow: hidden; background: var(--bg-viewer);
}
.viewer-gradient-border { display: none; }
.viewer-container canvas { display: block; width: 100% !important; height: 100% !important; border-radius: 18px; }
.viewer-hint {
  position: absolute; bottom: 44px; right: 44px;
  padding: 7px 14px; font-size: 0.6875rem; font-weight: 500;
  color: var(--text-faint); background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px); border: 1px solid var(--border-light);
  border-radius: 100px; pointer-events: none; user-select: none;
  opacity: 0.6; transition: opacity 0.3s; z-index: 3;
}
.viewer-section:hover .viewer-hint { opacity: 1; }

/* ── Right Panel ─────────────────────────────────────────────── */
.customization-section {
  padding: 40px 40px 80px;
  border-left: 1px solid var(--border-light);
  overflow-y: auto; max-height: calc(100vh - 80px);
  position: sticky; top: 80px;
}

.customization-header { margin-bottom: 24px; }

.section-title {
  font-size: 1.75rem; font-weight: 700; letter-spacing: -0.022em;
  line-height: 1.15; color: var(--text);
}
.section-subtitle {
  font-size: 1rem; font-weight: 400; color: var(--text-light); margin-top: 4px;
}

/* ── Presets Section ─────────────────────────────────────────── */
.presets-container {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
}
.presets-title {
  font-size: 1.3125rem; font-weight: 700; line-height: 1.25;
  letter-spacing: -0.016em; color: var(--text); margin-bottom: 16px;
}
.presets-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.preset-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 10px; cursor: pointer; text-align: center;
  background: #fff;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  display: flex; flex-direction: column; align-items: center;
}
.preset-card:hover { border-color: var(--border); transform: translateY(-2px); }
.preset-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.preset-preview-wrapper {
  width: 100%; aspect-ratio: 1.15;
  display: flex; align-items: center; justify-content: center;
  background: #d1d1d6; border-radius: 8px; margin-bottom: 8px;
  overflow: hidden; position: relative;
}
.preset-svg-icon {
  width: 45%; height: 45%;
  transition: transform 0.3s;
}
.preset-card:hover .preset-svg-icon { transform: rotate(12deg) scale(1.05); }
.preset-img {
  width: 100%; height: 100%; object-fit: contain; transition: transform 0.3s;
}
.preset-card:hover .preset-img { transform: scale(1.05); }
.preset-meta { display: flex; flex-direction: column; gap: 3px; }
.preset-label { font-size: 0.75rem; font-weight: 600; color: var(--text); }
.preset-desc { font-size: 0.625rem; color: var(--text-light); line-height: 1.25; }

/* Themes for fallback SVG icons */
.preset-svg-icon.white-theme circle { stroke: #ffffff; }
.preset-svg-icon.white-theme line { stroke: #1d1d1f; }
.preset-svg-icon.white-theme circle[fill] { fill: #ffffff; stroke: #1d1d1f; }

.preset-svg-icon.black-theme circle { stroke: #1d1d1f; }
.preset-svg-icon.black-theme line { stroke: #ffffff; }
.preset-svg-icon.black-theme circle[fill] { fill: #1d1d1f; stroke: #ffffff; }

.preset-svg-icon.racer-theme circle { stroke: #bd162c; }
.preset-svg-icon.racer-theme line { stroke: #1d1d1f; }
.preset-svg-icon.racer-theme circle[fill] { fill: #bd162c; stroke: #1d1d1f; }

.customization-panel { display: flex; flex-direction: column; gap: 0; }

/* ── Config Section (one per category) ───────────────────────── */
.config-section {
  padding: 28px 0 8px;
  border-top: 1px solid var(--border-light);
}
.config-section:first-child { border-top: none; padding-top: 0; }

.config-heading { margin-bottom: 16px; }

.config-title {
  font-size: 1.3125rem; font-weight: 400; line-height: 1.25;
  letter-spacing: -0.016em; color: var(--text); margin: 0;
}
.config-title strong { font-weight: 700; }
.config-title span { color: var(--text-light); }

/* ── Config Card (one per group) ─────────────────────────────── */
.config-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.config-card:hover { border-color: var(--border); }
.config-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.swatch-row {
  display: flex; align-items: center; justify-content: space-between;
}

.config-label {
  font-size: 0.875rem; font-weight: 500; color: var(--text);
}

/* ── Swatches ────────────────────────────────────────────────── */
.color-swatches { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.color-swatch {
  width: 30px; height: 30px; border-radius: 50%; border: none;
  cursor: pointer; position: relative; outline: none;
  -webkit-appearance: none; appearance: none;
  transition: transform 0.15s ease;
}
.color-swatch:hover { transform: scale(1.12); }
.color-swatch:active { transform: scale(0.95); }

.color-swatch[data-color="midnight-black"] { background: #1d1d1f; }
.color-swatch[data-color="arctic-white"] { background: #ffffff; box-shadow: inset 0 0 0 1px #d2d2d7; }
.color-swatch[data-color="racing-red"] { background: #bd162c; }

/* Selected ring — clean gap ring like Apple */
.color-swatch.selected {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--text) !important;
}

/* ── Reset Link ──────────────────────────────────────────────── */
.reset-link {
  display: inline-block; margin-top: 20px;
  font-family: inherit; font-size: 0.875rem; font-weight: 400;
  color: var(--accent); background: none; border: none;
  cursor: pointer; text-align: left; padding: 0;
  transition: opacity 0.2s;
}
.reset-link:hover { opacity: 0.7; text-decoration: underline; }

/* ── Reset wrapper — hidden in production ────────────────────── */
.reset-wrapper { display: none; }

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border-light);
  padding: 80px 40px 40px;
  background: var(--bg);
  color: var(--text-light);
  font-size: 0.8125rem;
}
.footer-container {
  max-width: 1024px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.brand-col {
  padding-right: 40px;
}
.footer-logo {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.footer-tagline {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-light);
}
.footer-col-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-copy {
  color: var(--text-faint);
  font-size: 0.75rem;
}
.footer-payment-badges {
  display: flex;
  gap: 12px;
  align-items: center;
}
.payment-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 4px 8px;
  background: var(--border-light);
  color: var(--text-light);
  border-radius: 4px;
  letter-spacing: -0.01em;
  user-select: none;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .main-content { grid-template-columns: 1fr; }
  .viewer-section { position: relative; top: 0; height: 50vh; min-height: 320px; padding: 16px; }
  .viewer-hint { bottom: 24px; right: 24px; }
  .customization-section {
    position: relative; top: 0; max-height: none; overflow-y: visible;
    border-left: none; border-top: 1px solid var(--border-light); padding: 32px 24px 64px;
  }
  .presets-grid { gap: 12px; }
}

@media (max-width: 768px) {
  .info-strip { padding: 8px 16px; height: auto; }
  .info-strip-inner { grid-template-columns: 1fr; gap: 6px; }
  .info-item { justify-content: flex-start; }
  .main-content { margin-top: 120px; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 16px; }
  .section-title { font-size: 1.4rem; }
  .customization-section { padding: 24px 16px 48px; }
  .config-title, .presets-title { font-size: 1.125rem; }
  .viewer-hint { font-size: 0.625rem; bottom: 16px; right: 16px; padding: 6px 12px; }
  .color-swatch { width: 26px; height: 26px; }
  .presets-grid { grid-template-columns: 1fr; gap: 10px; }
}

/* ── Transition Overlay ──────────────────────────────────────── */
.transition-overlay {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.transition-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.loader-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loader-text {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-light);
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Render Status Badge ─────────────────────────────────────── */
.render-status-badge {
  position: absolute;
  bottom: 44px;
  left: 44px;
  padding: 8px 14px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
  user-select: none;
  z-index: 4;
}
.render-status-badge.visible {
  opacity: 1;
  transform: translateY(0);
}
.render-badge-icon {
  position: relative;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.render-spinner {
  width: 12px;
  height: 12px;
  border: 2.2px solid var(--text-light);
  border-top-color: transparent;
  border-radius: 50%;
  animation: render-spin 0.8s linear infinite;
}
@keyframes render-spin {
  to { transform: rotate(360deg); }
}
.render-checkmark {
  width: 14px;
  height: 14px;
  stroke: #34c759;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.render-status-text {
  letter-spacing: 0.02em;
}

@media (max-width: 480px) {
  .render-status-badge {
    bottom: 16px;
    left: 16px;
    font-size: 0.625rem;
    padding: 6px 12px;
  }
}

/* ── Noise Overlay for Progressive Rendering ─────────────────── */
.render-noise-overlay {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: overlay;
  transition: opacity 0.3s ease;
  border-radius: 18px;
}
.render-noise-overlay.active {
  opacity: 0.18;
}

/* ── Viewer Controls ─────────────────────────────────────────── */
.viewer-controls {
  position: absolute;
  top: 44px;
  right: 44px;
  display: flex;
  gap: 8px;
  z-index: 4;
}
.control-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px) saturate(140%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  transition: background 0.25s, transform 0.2s, color 0.25s, box-shadow 0.25s;
}
.control-btn:hover {
  background: #ffffff;
  color: var(--accent);
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.control-btn:active {
  transform: scale(0.95);
}
.control-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

@media (max-width: 480px) {
  .viewer-controls {
    top: 16px;
    right: 16px;
  }
  .control-btn {
    width: 32px;
    height: 32px;
  }
  .control-btn svg {
    width: 14px;
    height: 14px;
  }
}

/* ── Apple Store Style Selection Cards ───────────────────────── */
.mount-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  padding: 4px; /* prevents clipping of the active outer box-shadow */
}

.mount-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.mount-card:hover {
  border-color: var(--text-light);
}

.mount-card.selected {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
  padding: 15px 19px; /* offset the 2px border to prevent layout shifts */
}

.mount-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mount-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
}

.mount-card-desc {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-light);
  line-height: 1.35;
}

.mount-card-price {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
  margin-left: auto;
  padding-left: 16px;
  white-space: nowrap;
}

/* ── Cart Drawer Overlay ────────────────────────────────────── */
.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.cart-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cart-drawer {
  position: relative;
  width: 100%;
  max-width: 485px;
  height: 100%;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 32px;
}

.cart-overlay.active .cart-drawer {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.cart-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.cart-close-btn {
  background: var(--border-light);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: background-color 0.2s, transform 0.2s;
}

.cart-close-btn:hover {
  background: var(--border);
  transform: scale(1.05);
}

.cart-content {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 24px;
  padding-right: 8px;
}

/* Custom scrollbar for cart-content */
.cart-content::-webkit-scrollbar {
  width: 6px;
}
.cart-content::-webkit-scrollbar-track {
  background: transparent;
}
.cart-content::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 99px;
}

.cart-item {
  display: flex;
  gap: 16px;
  background: #ffffff;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.cart-item-preview {
  width: 72px;
  height: 72px;
  background: var(--bg-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.cart-item-visual {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px 0;
}

.cart-item-preset {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 10px 0;
}

.cart-item-specs {
  font-size: 0.75rem;
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 2px solid var(--border-light);
  padding-left: 8px;
  margin-bottom: 10px;
  line-height: 1.4;
}

.cart-item-mount {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-light);
  margin: 0;
}

.cart-summary {
  background: #f5f5f7;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-light);
}

.cart-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
  margin-top: 4px;
}

.cart-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.cart-checkout-btn {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s, transform 0.2s;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.15);
}

.cart-checkout-btn:hover {
  background: #0077ed;
  transform: translateY(-1px);
}

.cart-checkout-btn:active {
  transform: translateY(1px);
}

.cart-continue-btn {
  background: transparent;
  color: var(--accent);
  border: none;
  padding: 10px;
  border-radius: 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s;
}

.cart-continue-btn:hover {
  background: var(--border-light);
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s;
}

.cart-item-remove:hover {
  opacity: 0.7;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .cart-drawer {
    max-width: 100%;
    padding: 24px;
  }
}

/* ── Product Features Section (Alternating Grid) ──────────────── */
.features-section {
  padding: 140px 40px;
  background: var(--bg);
}
.features-container {
  max-width: 1024px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.feature-row {
  display: flex;
  align-items: center;
  gap: 80px;
  margin-bottom: 140px;
}
.feature-row:last-child {
  margin-bottom: 0;
}
.feature-row.reverse {
  flex-direction: row-reverse;
}
.feature-image-wrapper {
  flex: 1;
  max-width: 460px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
  background: #f5f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.feature-image-wrapper:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.feature-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.feature-text-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.feature-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #1d1d1f 0%, #434347 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.feature-subtitle {
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  background: linear-gradient(90deg, #bd162c 0%, #ff453a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.feature-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-light);
  font-weight: 400;
}

/* ── FAQ Section ─────────────────────────────────────────────── */
.faq-section {
  padding: 100px 40px 140px;
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
  border-top: 1px solid var(--border-light);
}
.faq-container {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}
.faq-section-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: #1d1d1f;
  margin-bottom: 40px;
  text-align: left;
  border-bottom: 1px solid #d2d2d7;
  padding-bottom: 28px;
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
}
.faq-list {
  display: flex;
  flex-direction: column;
}
.faq-item {
  background: transparent;
  border: none;
  border-bottom: 1px solid #d2d2d7;
  border-radius: 0;
  overflow: hidden;
  transition: none;
}
.faq-item:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
  border-color: #d2d2d7;
}
.faq-item[open] {
  border-color: #d2d2d7;
  box-shadow: none;
}
.faq-question {
  padding: 24px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1d1d1f;
  letter-spacing: -0.01em;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  outline: none;
}
.faq-question::-webkit-details-marker {
  display: none;
}
.faq-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #86868b;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.faq-icon svg {
  width: 18px;
  height: 18px;
}
.faq-item[open] .faq-question {
  color: #1d1d1f;
}
.faq-item[open] .faq-icon {
  transform: rotate(180deg);
  color: #1d1d1f;
}
.faq-answer {
  padding: 0 0 24px 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #1d1d1f;
  border-top: none;
  font-weight: 400;
}
.faq-answer p {
  margin: 0 0 12px 0;
}
.faq-answer p:last-child {
  margin-bottom: 0;
}

/* ── Footer Link Underline Animation ─────────────────────────── */
.footer-links a {
  position: relative;
  color: var(--text-light);
  text-decoration: none;
  display: inline-block;
  transition: color 0.25s ease;
}
.footer-links a::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1.5px;
  bottom: -2px;
  left: 0;
  background-color: var(--accent);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-links a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* ── Scroll Reveal Animations ───────────────────────────────── */
.reveal-hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.reveal-active {
  opacity: 1;
  transform: translateY(0);
}

.footer-grid .footer-col:nth-child(1).reveal-active { transition-delay: 0.0s; }
.footer-grid .footer-col:nth-child(2).reveal-active { transition-delay: 0.1s; }
.footer-grid .footer-col:nth-child(3).reveal-active { transition-delay: 0.2s; }
.footer-grid .footer-col:nth-child(4).reveal-active { transition-delay: 0.3s; }

/* ── Product Features & FAQ & Footer (V4 Responsive) ────────── */
@media (max-width: 1024px) {
  .features-section, .faq-section {
    padding: 80px 24px;
  }
  .feature-row {
    flex-direction: column !important;
    gap: 48px;
    text-align: center;
  }
  .feature-image-wrapper {
    max-width: 100%;
  }
  .feature-title {
    font-size: 2rem;
  }
  .feature-subtitle {
    font-size: 0.95rem;
  }
  .faq-section-title {
    font-size: 2rem;
    margin-bottom: 40px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .brand-col {
    grid-column: span 2;
    padding-right: 0;
  }
}

@media (max-width: 576px) {
  .features-section, .faq-section {
    padding: 60px 16px;
  }
  .feature-title {
    font-size: 1.75rem;
  }
  .faq-section-title {
    font-size: 1.75rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .brand-col {
    grid-column: span 1;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* ── Checkout Section ────────────────────────────────────────── */
.checkout-section {
  width: 100%;
  background: var(--bg);
  min-height: calc(100vh - 80px);
  margin-top: 80px;
  padding: 48px 24px 80px;
  display: flex;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.checkout-container {
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 64px;
}

.checkout-heading {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 32px;
}

.checkout-group {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 32px;
}

.checkout-group:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.checkout-group-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 20px;
}

/* Form inputs styling */
.input-row {
  display: flex;
  gap: 16px;
}

.input-field-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  width: 100%;
  flex: 1;
}

.input-field-wrapper label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-light);
}

.input-field-wrapper input,
.input-field-wrapper select {
  height: 48px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  font-size: 0.9375rem;
  font-family: inherit;
  width: 100%;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field-wrapper input:focus,
.input-field-wrapper select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

/* Dropdown select styling arrow */
.input-field-wrapper select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 14px;
  padding-right: 40px;
}

.input-field-wrapper input[readonly] {
  background: var(--border-light);
  border-color: var(--border-light);
  color: var(--text-faint);
  cursor: not-allowed;
}

/* Error validation styling */
.input-field-wrapper.invalid input,
.input-field-wrapper.invalid select {
  border-color: #d82b3d;
  background-color: #fff8f8;
}

.error-msg {
  display: none;
  font-size: 0.75rem;
  font-weight: 500;
  color: #d82b3d;
  margin-top: -2px;
}

.input-field-wrapper.invalid .error-msg {
  display: block;
}

/* Add-ons checkboxes */
.add-on-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px 20px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.add-on-option:hover {
  border-color: var(--border);
}

.checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  user-select: none;
  flex: 1;
  padding-left: 36px;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-container .checkmark {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 20px;
  width: 20px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background-color: #ffffff;
  transition: background-color 0.2s, border-color 0.2s;
}

.checkbox-container:hover input ~ .checkmark {
  border-color: var(--text-light);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--accent);
  border-color: var(--accent);
}

.checkbox-container .checkmark::after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark::after {
  display: block;
}

.checkbox-container .checkmark::after {
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.addon-label-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.addon-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.addon-desc {
  font-size: 0.75rem;
  color: var(--text-light);
}

.addon-price {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

/* Stripe Express payments styling */
.stripe-express-payments {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.express-btn {
  height: 48px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.express-btn:hover {
  opacity: 0.9;
}

.btn-apple-pay {
  background: #000000;
  color: #ffffff;
}

.btn-google-pay {
  background: #f5f5f7;
  color: #1d1d1f;
  border: 1px solid var(--border);
}

.payment-separator {
  text-align: center;
  position: relative;
  margin: 24px 0;
}

.payment-separator::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--border-light);
  z-index: 1;
}

.payment-separator span {
  position: relative;
  background: #ffffff;
  padding: 0 16px;
  font-size: 0.8125rem;
  color: var(--text-faint);
  z-index: 2;
  font-weight: 500;
}

.stripe-input-container {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  background: #fafafa;
}

.stripe-secure-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  color: var(--text-faint);
  font-weight: 500;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stripe-input-inner {
  position: relative;
  width: 100%;
}

.stripe-input-inner input {
  padding-left: 48px;
}

.stripe-card-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  pointer-events: none;
}

/* Checkout action buttons */
.checkout-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
}

.checkout-pay-btn {
  height: 52px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.15);
  transition: background-color 0.2s, transform 0.2s;
}

.checkout-pay-btn:hover {
  background: #0077ed;
  transform: translateY(-1px);
}

.checkout-pay-btn:active {
  transform: translateY(1px);
}

.checkout-cancel-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.checkout-cancel-link:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* Spinner for simulated pay action button */
.btn-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

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

/* Checkout Summary Column */
.checkout-summary-col {
  background: #f5f5f7;
  border-radius: 20px;
  padding: 40px 32px;
  align-self: start;
}

.summary-heading {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 24px;
}

.checkout-summary-items {
  max-height: 400px;
  overflow-y: auto;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

/* Summary items box overrides */
.checkout-summary-items .cart-item {
  background: #ffffff;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  gap: 12px;
}

.checkout-summary-items .cart-item:last-child {
  margin-bottom: 0;
}

.checkout-summary-items .cart-item-preview {
  width: 56px;
  height: 56px;
}

.checkout-summary-items .cart-item-name {
  font-size: 0.9375rem;
}

.checkout-summary-items .cart-item-preset {
  margin: 2px 0 4px 0;
}

.checkout-summary-items .cart-item-remove {
  display: none;
}

/* Checkout Pricing rows */
.checkout-pricing-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9375rem;
  color: var(--text-light);
  font-weight: 500;
}

.price-row.text-faint {
  font-size: 0.8125rem;
  color: var(--text-faint);
}

.price-row.total-row {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 4px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

/* ── Confirmation Section ────────────────────────────────────── */
.confirmation-section {
  width: 100%;
  background: var(--bg);
  min-height: calc(100vh - 80px);
  margin-top: 80px;
  padding: 80px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.confirmation-container {
  width: 100%;
  max-width: 560px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.confirmation-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 24px 0 12px 0;
}

.confirmation-subtitle {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 40px;
}

.order-details-card {
  width: 100%;
  background: #f5f5f7;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.details-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9375rem;
}

.details-row.border-top {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 4px;
}

.details-label {
  font-weight: 500;
  color: var(--text-light);
}

.details-value {
  font-weight: 600;
  color: var(--text);
}

.details-value.price-highlight {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent);
}

.confirmation-actions {
  width: 100%;
}

.conf-home-btn {
  height: 52px;
  background: var(--text);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: background-color 0.2s, transform 0.2s;
}

.conf-home-btn:hover {
  background: #000000;
  transform: translateY(-1px);
}

.conf-home-btn:active {
  transform: translateY(1px);
}

/* ── Animated Success Checkmark SVG/CSS ──────────────────────── */
.success-checkmark-wrapper {
  width: 80px;
  height: 80px;
}

.success-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto;
}

.success-checkmark .check-icon {
  width: 80px;
  height: 80px;
  position: relative;
  border-radius: 50%;
  box-sizing: content-box;
  border: 4px solid #4caf50;
}

.success-checkmark .check-icon::before {
  top: 3px;
  left: -2px;
  width: 30px;
  transform-origin: 100% 50%;
  border-radius: 100px 0 0 100px;
}

.success-checkmark .check-icon::after {
  top: 0;
  left: 30px;
  width: 60px;
  transform-origin: 0 50%;
  border-radius: 0 100px 100px 0;
  animation: rotate-circle 4.25s ease-in;
}

.success-checkmark .check-icon::before, .success-checkmark .check-icon::after {
  content: '';
  height: 100px;
  position: absolute;
  background: #ffffff;
  transform: rotate(-45deg);
}

.success-checkmark .check-icon .icon-circle {
  top: -4px;
  left: -4px;
  position: absolute;
  box-sizing: content-box;
  width: 80px;
  height: 80px;
  border: 4px solid rgba(76, 175, 80, 0.2);
  border-radius: 50%;
  z-index: 2;
}

.success-checkmark .check-icon .icon-fix {
  top: 8px;
  left: 28px;
  width: 5px;
  height: 85px;
  position: absolute;
  background: #ffffff;
  z-index: 1;
  transform: rotate(-45deg);
}

.success-checkmark .check-icon .icon-line {
  height: 5px;
  background-color: #4caf50;
  display: block;
  border-radius: 2px;
  position: absolute;
  z-index: 10;
}

.success-checkmark .check-icon .icon-line.line-tip {
  top: 43px;
  left: 14px;
  width: 25px;
  transform: rotate(45deg);
  animation: icon-line-tip 0.75s;
}

.success-checkmark .check-icon .icon-line.line-long {
  top: 38px;
  right: 8px;
  width: 47px;
  transform: rotate(-45deg);
  animation: icon-line-long 0.75s;
}

@keyframes icon-line-tip {
  0% { width: 0; left: 1px; top: 19px; }
  54% { width: 0; left: 1px; top: 19px; }
  70% { width: 50px; left: -8px; top: 37px; }
  84% { width: 17px; left: 21px; top: 48px; }
  100% { width: 25px; left: 14px; top: 43px; }
}

@keyframes icon-line-long {
  0% { width: 0; right: 46px; top: 54px; }
  65% { width: 0; right: 46px; top: 54px; }
  84% { width: 55px; right: 0px; top: 35px; }
  100% { width: 47px; right: 8px; top: 38px; }
}

@keyframes rotate-circle {
  0% { transform: rotate(-45deg); }
  5% { transform: rotate(-45deg); }
  12% { transform: rotate(-405deg); }
  100% { transform: rotate(-405deg); }
}

/* ── Checkout Responsive Layout ──────────────────────────────── */
@media (max-width: 1024px) {
  .checkout-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .checkout-summary-col {
    order: -1;
  }
}

@media (max-width: 576px) {
  .checkout-section {
    padding: 32px 16px 64px;
  }
  .checkout-heading {
    font-size: 1.75rem;
    margin-bottom: 24px;
  }
  .input-row {
    flex-direction: column;
    gap: 0;
  }
  .stripe-express-payments {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ── Snipcart Header Shopping Bag Button ────────────────────── */
.header-cart-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  position: relative;
  padding: 6px;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
}

.header.hero-mode .header-cart-btn {
  opacity: 0;
  transform: scale(0.9) translateX(10px);
  pointer-events: none;
}

.header:not(.hero-mode) .header-cart-btn {
  opacity: 1;
  transform: scale(1) translateX(0);
  pointer-events: auto;
}


.header-cart-btn:hover {
  opacity: 0.75;
  transform: scale(1.05);
}

.header-cart-btn:active {
  transform: scale(0.95);
}

.header-cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}
.header-cart-badge:empty {
  display: none;
}



