/** Shopify CDN: Minification failed

Line 427:0 Unexpected "#3d-preview-canvas"
Line 435:0 Unexpected "#3d-preview-canvas"
Line 1191:0 Unexpected "#3d-preview-canvas"
Line 1195:0 Unexpected "#3d-preview-canvas"
Line 1199:0 Unexpected "#3d-preview-canvas"
Line 1527:0 Unexpected "#3d-preview-container"
Line 1998:2 Unexpected "#3d-preview-container"
Line 2002:2 Unexpected "#3d-preview-canvas"
Line 2009:2 Unexpected "#3d-preview-container"
Line 2013:2 Unexpected "#3d-preview-canvas"
... and 9 more hidden warnings

**/
/* sv-build-1778863525 */
/* sv-css-1778861036 */
/* sv-css-build 1778839540 */
/* S&V Brand Font — matches skinnerandvale.com */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600;700&display=swap');

/* ============================================================================
   JACKET CUSTOMIZER - STYLESHEET
   ============================================================================
   Auto-generated from: jacket-customizer-MOBILE-NIKE-STYLE-TEST.html
   DO NOT EDIT THIS FILE DIRECTLY - Edit the HTML file and run sync script
   Last sync: 2025-11-13 17:24:20
   ============================================================================

   All styles are scoped with .jacket-customizer-wrapper to prevent
   conflicts with existing Shopify theme styles.
   ============================================================================ */

/* ============================================================================
   SHOPIFY THEME CSS ISOLATION & RESET
   Prevents Shopify theme styles from interfering with customizer
   ============================================================================ */

/* Isolate the customizer from Shopify theme CSS */
.jacket-customizer-wrapper {
  all: initial;
  display: block;
  position: relative;
  box-sizing: border-box;
}

/* Reset all child elements to prevent theme inheritance */
.jacket-customizer-wrapper *,
.jacket-customizer-wrapper *::before,
.jacket-customizer-wrapper *::after {
  all: unset;
  box-sizing: border-box;
  display: revert;
  position: revert;
}

/* Restore essential properties that 'all: unset' removes */
.jacket-customizer-wrapper {
  font-family: 'Jost', sans-serif !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
  color: #0f172a !important;
  background: #ffffff !important;
  /* 2026-05-10 v4: extended max-width 1800 → 1900. Margins halve from
     100px → 50px each side at a 2000px viewport. Reviews tab (~40px
     wide) still fits inside the right margin with ~10px clearance.
     Mobile (≤1024px) keeps full width — see media query lower. */
  width: 100% !important;
  max-width: 1900px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  /* 2026-05-10: wrapper now exactly fits between Shopify's fixed header
     (80px) and the viewport bottom — no overshoot, footer stays cleanly
     below the fold until the user scrolls. Flex column lets the nav stay
     auto-sized and the layout flex-fills the remainder. */
  display: flex !important;
  flex-direction: column !important;
  height: calc(100vh - 80px) !important;
  max-height: calc(100vh - 80px) !important;
  min-height: calc(100vh - 80px) !important;
}

/* ============================================================================
   END CSS ISOLATION
   ============================================================================ */

/* JACKET CUSTOMIZER - COMPLETE UI/UX STYLES
   Modern, professional interface with black theme */
:root {
  /* Color Variables */
  --color-primary: #0e0e0f;
  --color-border: rgba(14,14,15,0.12);
  --color-white: #ffffff;
  --color-bg-light: #f2f2f0;
  --color-dark: #0e0e0f;
  --color-text-muted: #5a5a5c;
  --color-border-light: rgba(14,14,15,0.08);
  --color-success: #298a30;
  --color-text-secondary: #5a5a5c;
  --color-border-hover: rgba(14,14,15,0.25);
  /* Spacing Variables */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  /* Border Radius Variables */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  /* Shadow Variables */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  /* Transition Variables */
  --transition-fast: all 0.15s ease;
  --transition-normal: all 0.2s ease;
  --transition-slow: all 0.3s ease;
  /* Font Size Variables */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2.5rem;
}

/* Utility Classes */
.rounded-sm {
  border-radius: var(--radius-sm);
}

.rounded-md {
  border-radius: var(--radius-md);
}

.rounded-lg {
  border-radius: var(--radius-lg);
}

.rounded-full {
  border-radius: 50%;
}

.shadow-sm {
  box-shadow: var(--shadow-sm);
}

.shadow-md {
  box-shadow: var(--shadow-md);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}

.p-xs {
  padding: var(--spacing-xs);
}

.p-sm {
  padding: var(--spacing-sm);
}

.p-md {
  padding: var(--spacing-md);
}

.p-lg {
  padding: var(--spacing-lg);
}

.p-xl {
  padding: var(--spacing-xl);
}

/* Reset and base styles */
.jacket-customizer-wrapper {
  font-family: 'Jost', sans-serif;
  width: 100%;
  margin: 0;
  background: var(--color-white);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.jacket-customizer-wrapper * {
  box-sizing: border-box;
}

/* TOP NAVIGATION */
.customizer-top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-white);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-left {
  display: flex;
  gap: 0.5rem;
}

.nav-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-normal);
}

.nav-btn.active {
  background: #f1f5f9;
  color: #0f172a;
}

.nav-btn:hover {
  background: var(--color-bg-light);
  color: #334155;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Subtle hairline dividers group the right-side toolbar into three
   visual clusters: [Reset, Refresh] | [Screenshot, Save] | [Fullscreen].
   Hairlines are 1px, brand-dark at 8% alpha, inset top/bottom for elegance. */
.nav-right > *:nth-child(3),
.nav-right > *:nth-child(5) {
  position: relative;
  margin-left: 14px;
}
.nav-right > *:nth-child(3)::before,
.nav-right > *:nth-child(5)::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(14, 14, 15, 0.10);
  pointer-events: none;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #e2e8f0;
  background: var(--color-white);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-normal);
  color: var(--color-text-muted);
}

.icon-btn:hover {
  border-color: #cbd5e1;
  background: var(--color-bg-light);
  color: #475569;
}

/* MAIN LAYOUT */
.customizer-main-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  min-height: calc(100vh - 80px);
}

/* 3D VIEWER SECTION */
.viewer-section {
  position: relative;
  background: var(--color-bg-light);
  display: flex;
  flex-direction: column;
}

.viewer-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

.view-selector {
  display: flex;
  gap: 0.5rem;
}

.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.5rem 0.85rem;
  border: 1px solid #e2e8f0;
  background: var(--color-white);
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-normal);
  font-size: var(--text-sm);
  font-weight: 500;
}

/* Tiny camera-angle indicator: small ring + dot showing where the
   camera sits around the jacket. Lock fills/strokes via CSS — SVG
   currentColor presentation attribute is unreliable across browsers. */
.view-btn-angle {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
}
/* First circle = the outer ring */
.view-btn-angle > circle:first-child {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  opacity: 0.45;
}
/* Second circle = the camera-position dot (solid) */
.view-btn-angle > circle:nth-child(2) {
  fill: currentColor;
  stroke: none;
  opacity: 1;
}

.view-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.view-btn:hover:not(.active) {
  border-color: #94a3b8;
  background: var(--color-bg-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10), 0 1px 3px rgba(0, 0, 0, 0.06);
  -webkit-transform: translateY(-1px);
  transform: translateY(-1px);
  color: #1e293b;
}

.viewer-actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #e2e8f0;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-normal);
  color: var(--color-text-muted);
}

.action-btn:hover {
  border-color: #cbd5e1;
  background: var(--color-bg-light);
}

.viewer-container {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  min-height: 500px;
  overflow: hidden;
  transition: background-color 0.4s ease;
}

.viewer-container.viewer-theme-dark {
  background: #0e0e0f;
}

.logo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #6b7280;
  text-align: center;
  padding: var(--spacing-xl);
  min-height: 400px;
}

.logo-placeholder h4 {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.logo-placeholder p {
  margin: 0.5rem 0 0 0;
  font-size: 0.9rem;
  color: #6b7280;
}

#3d-preview-canvas {
  max-width: 100%;
  max-height: 100%;
  display: none;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

#3d-preview-canvas.fade-in {
  opacity: 1;
}

/* CONFIGURATION PANEL */
.config-panel {
  background: var(--color-white);
  border-left: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 80px);
  position: relative;
}

.panel-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-light);
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 1rem;
}

.panel-header h1,
.panel-header h2,
.panel-header .panel-title {
  font-size: var(--text-xl);
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1rem;
}

.progress-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* CONFIGURATION SECTIONS */
.config-section {
  border: 0;
  border-bottom: 1px solid rgba(14, 14, 15, 0.08);
  margin-bottom: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  transition: background 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.config-section:last-child {
  border-bottom: 0;
}

/* 2026-05-10 (F005): expanded section needs a clear "you are here"
   cue — was relying only on chevron rotation + faint colour shift.
   Brand-green 3px left border + 4% green tint background = subtle but
   unmistakable. Section "STEP 0X" eyebrow goes brand-green too (F010).
   Tint avoids harsh contrast — Sam wanted intuitive, not loud. */
.config-section.expanded {
  background: rgba(41, 138, 48, 0.04);
  box-shadow: inset 3px 0 0 0 #298a30;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: var(--transition-normal);
}

.section-header:hover {
  background: var(--color-bg-light);
}

.section-info {
  display: block;
  flex: 1;
  min-width: 0;
}

/* Number renders as a small uppercase "STEP 01" eyebrow above the title.
   Replaces the heavy filled circle. The existing markup keeps the digit
   ("1", "2"…) and ::before adds the "Step 0" prefix. */
.section-number {
  display: inline-block !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  background: transparent !important;
  color: rgba(14, 14, 15, 0.4) !important;
  border: 0 !important;
  border-radius: 0 !important;
  font-size: 9px !important;
  font-weight: 600 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  margin: 0 0 4px 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  transform: none !important;
  box-shadow: none !important;
}

.section-number::before {
  content: "Step 0";
}

.config-section.expanded .section-number {
  background: transparent !important;
  /* 2026-05-10 (F010): brand-green eyebrow when section is active.
     Reinforces the green left-border + tint. */
  color: #298a30 !important;
  transform: none !important;
}

.section-details h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.section-details p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.current-selection {
  color: rgba(14, 14, 15, 0.55) !important;
  font-weight: 400 !important;
  letter-spacing: 0.02em !important;
}

.section-toggle {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(14, 14, 15, 0.55);
  transition: color 0.2s ease, transform 0.3s cubic-bezier(0.2, 0, 0, 1);
  padding: 0;
}

.section-toggle svg {
  display: block;
  width: 18px;
  height: 18px;
}

.section-header:hover .section-toggle {
  color: #0e0e0f;
}

.config-section.expanded .section-toggle {
  transform: rotate(180deg);
  color: #0e0e0f;
}

/* 2026-05-10 (F004): tightened animation. Was max-height: 0 → 1600px
   with ease-out — actual content (~700px) << 1600 ceiling, so the first
   ~50% of the close had no visible change. Solution: drop the ceiling
   to a tighter value (close to realistic max content height), shorter
   duration, and ease curve that gives perceived snap on close.
   For a perfect-fit close animation (grid-rows trick) the inner content
   needs a single wrapper — deferred to avoid Liquid restructure. */
.section-content {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-top: 0;
  padding-bottom: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.2s ease,
    padding-bottom 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.config-section.expanded .section-content {
  /* 1500 ceiling accommodates Custom Text section (~1400px) while
     reducing dead-time vs the previous 1600. */
  max-height: 1500px;
  opacity: 1;
  padding-bottom: 1.5rem;
}

/* FORM ELEMENTS */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.select-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  background: var(--color-white);
  color: var(--color-primary);
  font-size: var(--text-sm);
  transition: var(--transition-normal);
}

.select-input:focus {
  outline: none;
  border-color: #374151;
  box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.1);
}

/* PILL GRID - FOR TEXT-BASED SWATCHES */
.pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.pill-option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: var(--text-sm);
  font-weight: 500;
  color: #64748b;
  position: relative;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.pill-option:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  transform: translateY(-1px);
}

.pill-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 0;
  height: 0;
}

/* When the radio inside is checked, select the parent label */
/* 2026-05-10 (F008): brand dark #0e0e0f instead of pure black. */
.pill-option:has(input:checked) {
  background: #0e0e0f;
  color: #ffffff;
  border-color: #0e0e0f;
  box-shadow: 0 4px 12px rgba(14, 14, 15, 0.15);
  transform: scale(1.02);
}

/* Fallback for browsers without :has support */
/* 2026-05-10 (F008): pure black → brand dark #0e0e0f. Pure black
   looks slightly cold; brand dark is intentionally warmer. Tiny
   detail, matters at premium tier. */
.pill-option.active {
  background: #0e0e0f;
  color: #ffffff;
  border-color: #0e0e0f;
  box-shadow: 0 6px 16px rgba(14, 14, 15, 0.2);
  transform: translateY(-2px) scale(1.02);
}

.pill-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.pill-content svg {
  transition: transform 0.3s ease;
}

.pill-option:hover .pill-content svg {
  transform: translateY(-2px);
}

.pill-option.active .pill-content svg {
  stroke: #fff;
}

/* COLOR GRID - BLACK THEME */
.color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 8px;
}

.color-option {
  width: 48px;
  height: 48px;
  border: 3px solid #e2e8f0;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition-normal);
  position: relative;
  /* Ensure background color from liquid is visible */
  background-clip: border-box !important;
  /* Added texture for all material swatches */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.color-option:hover {
  transform: scale(1.08);
  border-color: #cbd5e1;
}

.color-option.active {
  border-color: rgba(14, 14, 15, 0.85);
  outline: 1px solid rgba(14, 14, 15, 0.4);
  outline-offset: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  z-index: 2;
}

/* Premium Lighting Overlay for Swatches */
.color-option::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 8px;
  width: 40%;
  height: 25%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 100%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.color-option::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 -4px 8px rgba(0,0,0,0.2), inset 0 2px 4px rgba(255,255,255,0.3);
  pointer-events: none;
}

.color-option input[type="radio"] {
  display: none;
}

/* HIGH-FIDELITY LUXURY SWATCHES */
.swatch-light-denim {
  background: radial-gradient(circle at 30% 30%, #bcd0e6, #8ba1bd);
}
.swatch-blue-denim {
  background: radial-gradient(circle at 30% 30%, #5b87f9, #3556b6);
}
.swatch-black-denim {
  background: radial-gradient(circle at 30% 30%, #3a3a3a, #111111);
}

.swatch-silver {
  background: conic-gradient(from 45deg, #f1f2f6, #bdc3c7, #f1f2f6, #95a5a6, #f1f2f6);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}
.swatch-bronze {
  background: conic-gradient(from 45deg, #d38f5f, #a05c30, #d38f5f, #703918, #d38f5f);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}
.swatch-gold {
  background: conic-gradient(from 45deg, #ffeba8, #ce9e42, #ffeba8, #b68525, #ffeba8);
}
.swatch-black-metal {
  background: conic-gradient(from 45deg, #444, #111, #444, #000, #444);
}

/* TEXT COLOR SWATCHES */
.swatch-text-none {
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.swatch-text-none::after {
  content: "✕";
  font-size: 14px;
  color: #94a3b8;
  box-shadow: none;
}
.swatch-text-black {
  background: #1a1a1a;
}
.swatch-text-white {
  background: #fdfdfd;
  border: 1px solid #e2e8f0;
}
.swatch-text-gold {
  background: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
}
.swatch-text-silver {
  background: linear-gradient(135deg, #bfc3c9, #ebedee, #abb0b6, #ced1d6, #979ba1);
}
.swatch-text-custom {
  background: linear-gradient(45deg, #f06, #9f6, #06f, #f90);
  background-size: 200% 200%;
  animation: rainbow-swatch 3s ease infinite;
}

@keyframes rainbow-swatch {
  0% { background-position: 0% 50% }
  50% { background-position: 100% 50% }
  100% { background-position: 0% 50% }
}

/* STUD PLACEMENT STYLES - REDESIGNED FOR BETTER UX */
.stud-placement-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.stud-area-group {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s ease;
}

.stud-area-group:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.stud-area-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stud-area-title::before {
  content: '';
  width: 3px;
  height: 16px;
  background: #1f2937;
  border-radius: 2px;
}

.stud-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stud-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
}

.stud-option:hover {
  border-color: #1f2937;
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.stud-option.active {
  border-color: #1f2937;
  background: rgba(31, 41, 55, 0.05);
  box-shadow: 0 0 0 1px rgba(31, 41, 55, 0.1);
}

.stud-option-label {
  font-size: 0.9rem;
  color: #374151;
  font-weight: 500;
  flex-grow: 1;
  margin: 0;
  cursor: pointer;
}

.stud-option.active .stud-option-label {
  color: #1f2937;
  font-weight: 600;
}

.stud-option input[type="checkbox"] {
  display: none;
}

/* Toggle animation - PURE CSS (works on all browsers) */
.stud-toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: #d1d5db;
  border-radius: 12px;
  transition: background 0.3s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.stud-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  /* CRITICAL: Force hardware acceleration */
  will-change: transform;
  transform: translateX(0) translateZ(0);
  -webkit-transform: translateX(0) translateZ(0);
}

/* CHECKED STATE - Single source of truth */
.stud-option input[type="checkbox"]:checked+.stud-option-content .stud-toggle-switch {
  background: #1f2937;
}

.stud-option input[type="checkbox"]:checked+.stud-option-content .stud-toggle-switch::after {
  transform: translateX(20px) translateZ(0);
  -webkit-transform: translateX(20px) translateZ(0);
}

.stud-option-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.stud-area-group.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.stud-area-group.disabled .stud-area-title::before {
  background: #9ca3af;
}

.stud-area-group.disabled .stud-option {
  background: #f9fafb;
  border-color: #f3f4f6;
}

.stud-area-group.disabled .stud-option-label {
  color: #9ca3af;
}

/* SUB-SECTION STYLES */
.sub-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.sub-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sub-section-header {
  margin-bottom: 1rem;
}

.sub-section-header h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sub-section-header h4::before {
  content: '';
  width: 2px;
  height: 18px;
  background: #1f2937;
  border-radius: 1px;
}

/* PATCH PLACEMENT STYLES - CONSISTENT WITH STUD SYSTEM */
.patch-placement-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.patch-area-group {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s ease;
}

.patch-area-group:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.patch-area-title {
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.patch-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.patch-option {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.patch-option:hover {
  border-color: #1f2937;
  background: #f8fafc;
}

.patch-option input[type="checkbox"] {
  display: none;
}

.patch-option-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.patch-option-label {
  font-weight: 500;
  color: #374151;
  font-size: 0.875rem;
}

.patch-toggle-switch {
  width: 44px;
  height: 24px;
  background: #e5e7eb;
  border-radius: 12px;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.patch-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.patch-option input[type="checkbox"]:checked+.patch-option-content .patch-toggle-switch {
  background: #1f2937;
}

.patch-option input[type="checkbox"]:checked+.patch-option-content .patch-toggle-switch::after {
  transform: translateX(20px);
}

.patch-option input[type="checkbox"]:checked {
  background: #f9fafb;
  border-color: #1f2937;
}

.patch-option.active {
  background: #f9fafb;
  border-color: #1f2937;
}

.patch-option.active .patch-option-label {
  color: #1f2937;
  font-weight: 600;
}

/* Patch preview styles */
.patch-preview {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: none;
}

.patch-preview.show {
  display: block;
}

/* Interactive patch positioning styles */
#3d-preview-canvas {
  transition: cursor 0.2s ease;
}

#3d-preview-canvas.dragging-patch {
  cursor: grabbing !important;
}

#3d-preview-canvas.hovering-patch {
  cursor: grab !important;
}

/* Patch interaction feedback */
.patch-interaction-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.patch-interaction-hint.show {
  opacity: 1;
}

/* Patch positioning instructions */
.patch-positioning-info {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #374151;
}

.patch-positioning-info .info-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.patch-positioning-info .info-text {
  line-height: 1.4;
}

/* Patch mode toggle controls */
.patch-positioning-controls {
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.patch-mode-toggle {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.patch-mode-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.patch-mode-checkbox {
  display: none;
}

.patch-mode-switch {
  position: relative;
  width: 52px;
  height: 28px;
  background: #e5e7eb;
  border-radius: 14px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.patch-mode-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.patch-mode-checkbox:checked+.patch-mode-switch {
  background: #1f2937;
}

.patch-mode-checkbox:checked+.patch-mode-switch .patch-mode-slider {
  transform: translateX(24px);
}

.patch-mode-text {
  font-weight: 500;
  color: #374151;
  font-size: 0.875rem;
}

.patch-mode-checkbox:checked~.patch-mode-text {
  color: #1f2937;
  font-weight: 600;
}

/* Mode-specific instructions */
.mode-rotate,
.mode-edit {
  display: block;
}

.patch-edit-mode-active .mode-rotate {
  display: none;
}

.patch-edit-mode-active .mode-edit {
  display: block !important;
}

/* Enhanced patch visual feedback */
.patch-edit-mode-active .patch-mesh {
  filter: drop-shadow(0 0 8px rgba(31, 41, 55, 0.4));
}

.patch-edit-mode-active .patch-mesh:hover {
  filter: drop-shadow(0 0 12px rgba(31, 41, 55, 0.6));
}

/* PANEL FOOTER - BLACK THEME */
.panel-footer {
  background: var(--color-bg-light);
  border-top: 1px solid #e2e8f0;
  padding: var(--spacing-lg);
  position: sticky;
  bottom: 0;
  z-index: 10;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  margin-top: auto;
}

.price-summary {
  margin-bottom: 1.5rem;
}

.price-breakdown {
  background: var(--color-white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
}

.price-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.price-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0 0.5rem;
  border-top: 1px solid #e2e8f0;
  margin-top: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #0f172a;
}

.action-buttons {
  display: flex;
  gap: 0.75rem;
}

.btn-secondary {
  flex: 1;
  padding: 0.875rem 1.5rem;
  border: 1px solid #e2e8f0;
  background: var(--color-white);
  color: var(--color-text-muted);
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
}

.btn-secondary:hover {
  border-color: #cbd5e1;
  background: var(--color-bg-light);
  color: #475569;
}

.btn-primary {
  flex: 2;
  padding: 0.875rem 1.5rem;
  border: none;
  background: #0e0e0f;
  color: white;
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  font-size: var(--text-sm);
}

.btn-primary:hover {
  background: #298a30;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(41, 138, 48, 0.3);
}

/* LOADING SPINNER - UNVEILING SEQUENCE (VELVET CURTAIN) */
.loading-spinner {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999999 !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease, backdrop-filter 0.8s ease;
}

.loading-spinner.show {
  opacity: 1;
  visibility: visible;
  display: flex !important;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid #e5e7eb;
  border-top: 4px solid #374151;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 4px 12px rgba(55, 65, 81, 0.3);
  position: relative;
}

.spinner-inner {
  width: 40px;
  height: 40px;
  border: 3px solid transparent;
  border-top: 3px solid #1f2937;
  border-radius: 50%;
  animation: spin 0.8s linear infinite reverse;
  position: absolute;
  top: 6px;
  left: 6px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }

  to {
    transform: translate(-50%, -50%) scale(1.02);
    opacity: 0;
  }
}

.loading-text {
  color: var(--color-primary);
  font-weight: 600;
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.loading-size.calculating {
  animation: pulse 1.5s ease-in-out infinite;
}

.loading-spinner.complete {
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(10px);
}

.loading-progress-bar.complete {
  background: #10b981 !important;
  /* Green on completion */
  transition: background 0.3s ease;
}

/* 3D PREVIEW CONTAINER UPDATES */
#3d-preview-container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 500px;
  display: flex;
  /* DESKTOP: Allow wider container for better stud visibility */
  max-width: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* MOBILE RESPONSIVE */
@media (max-width: 1024px) {
  /* 2026-05-10: undo the desktop max-width / centred margin so mobile
     gets full-width usage. No Our Reviews tab overlap concern at this
     size (it auto-collapses) and screen real estate is tight. */
  .jacket-customizer-wrapper {
    max-width: none !important;
    margin: 0 !important;
  }

  .customizer-main-layout {
    grid-template-columns: 1fr;
  }

  .config-panel {
    max-height: none;
  }

  .viewer-controls {
    padding: 0.75rem 1rem;
  }

  .view-selector {
    gap: 0.25rem;
  }

  .view-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .customizer-top-nav {
    padding: 0.75rem 1rem;
  }

  .nav-btn {
    padding: 0.5rem 1rem;
    font-size: var(--text-sm);
  }

  .panel-header {
    padding: var(--spacing-md);
  }

  .section-header {
    padding: var(--spacing-md);
  }

  .section-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .config-section.expanded .section-content {
    padding-bottom: 1rem;
  }

  .action-buttons {
    flex-direction: column;
  }

  .btn-secondary,
  .btn-primary {
    flex: none;
  }
}


/* Debug Console Styles (from demo) - HIDDEN */
.debug-console {
  display: none !important;
  position: fixed;
  top: 20px;
  right: 20px;
  width: 400px;
  max-height: 300px;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid #333;
  border-radius: 8px;
  z-index: 10000;
  transform: translateX(420px);
  transition: transform 0.3s ease;
  font-family: 'Courier New', monospace;
  font-size: 12px;
}

.debug-console.show {
  transform: translateX(0);
}

.debug-header {
  background: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}

.debug-toggle {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
}

.debug-content {
  max-height: 250px;
  overflow-y: auto;
  padding: 8px;
}

.debug-message {
  margin: 2px 0;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 11px;
  line-height: 1.3;
}

/* Zoom Controls Styles */
.zoom-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 45px;
  height: 32px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin: 0 4px;
  user-select: none;
}

.action-btn {
  position: relative;
  overflow: hidden;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-btn:active {
  transform: translateY(0);
}

/* Zoom Indicator Animation */
#zoom-indicator {
  animation: zoomPulse 0.3s ease-out;
}

@keyframes zoomPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

/* Touch-friendly zoom controls for mobile */
@media (max-width: 768px) {
  .viewer-actions {
    gap: 8px;
  }

  .action-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .zoom-display {
    min-width: 50px;
    height: 44px;
    font-size: 14px;
  }

  /* Nike-inspired mobile interaction hints */
  .model-viewer {
    position: relative;
  }

  .model-viewer::after {
    content: "Drag to rotate • Pinch to zoom";
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    opacity: 0.8;
    pointer-events: none;
    z-index: 10;
    animation: fadeInOut 4s ease-in-out;
  }

  @keyframes fadeInOut {

    0%,
    100% {
      opacity: 0;
    }

    20%,
    80% {
      opacity: 0.8;
    }
  }
}

/* Nike-inspired price update animation */
@keyframes priceUpdate {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
    color: #2563eb;
  }

  100% {
    transform: scale(1);
  }
}

.price-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  transition: all 0.2s ease;
}

.price-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid #e2e8f0;
  margin-top: 8px;
  font-weight: 600;
}

/* Zoom Help Tooltip */
.zoom-help {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  border-radius: 12px;
  padding: 0;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  max-width: 300px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.zoom-help.show {
  opacity: 1;
  visibility: visible;
}

.zoom-help-content {
  padding: 20px;
}

.zoom-help h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  text-align: center;
}

.zoom-help ul {
  margin: 0 0 12px 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.zoom-help li {
  margin-bottom: 4px;
}

.zoom-help p {
  margin: 0 0 16px 0;
  text-align: center;
  font-style: italic;
  color: #fbbf24;
}

.zoom-help-close {
  display: block;
  width: 100%;
  background: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}

.zoom-help-close:hover {
  background: #2563eb;
}

/* Reset Button Animation */
.reset-active {
  animation: resetPulse 0.5s ease-out;
  background: #10b981 !important;
  color: white !important;
}

@keyframes resetPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Reset button hover state */
#reset-customizer:hover,
#zoom-reset:hover {
  background: #059669;
  color: white;
  transform: translateY(-1px);
}

/* Screenshot button styling */
#screenshot-btn {
  position: relative;
  overflow: hidden;
}

#screenshot-btn:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#screenshot-btn:active {
  transform: translateY(0);
  background: #2563eb;
}

/* Screenshot flash animation */
.screenshot-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.8);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  animation: flashEffect 0.3s ease-out;
}

@keyframes flashEffect {
  0% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/* Fullscreen mode styles */
.jacket-customizer-wrapper.fullscreen-mode {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  background: #1a1a1a !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.jacket-customizer-wrapper.fullscreen-mode .viewer-container {
  height: calc(100vh - 60px) !important;
}

.jacket-customizer-wrapper.fullscreen-mode .three-container {
  height: 100% !important;
}

.jacket-customizer-wrapper.fullscreen-mode .config-panel {
  height: calc(100vh - 60px) !important;
  max-height: none !important;
}

/* Fullscreen button icon switching */
.fullscreen-mode #fullscreen-btn .fullscreen-enter {
  display: none;
}

.fullscreen-mode #fullscreen-btn .fullscreen-exit {
  display: block !important;
}

/* Fullscreen transition */
.jacket-customizer-wrapper {
  transition: all 0.3s ease-in-out;
}

/* DESKTOP: Wider canvas for better stud visibility */
@media (min-width: 1024px) {
  #3d-preview-container {
    min-height: 600px;
  }

  #3d-preview-canvas {
    max-width: 1200px;
    max-height: 800px;
  }
}

@media (min-width: 1440px) {
  #3d-preview-container {
    min-height: 700px;
  }

  #3d-preview-canvas {
    max-width: 1400px;
    max-height: 900px;
  }
}

/* Hide body scrollbars in fullscreen */
body.fullscreen-active {
  overflow: hidden;
}

/* Ensure proper z-index for fullscreen */
.jacket-customizer-wrapper.fullscreen-mode * {
  position: relative;
}

/* Gender Change Warning Modal */
/* ─────────────────────────────────────────────────────────────────
   GENDER-CHANGE MODAL — 'Switch to Women's Jacket?' confirmation.
   Matches the brand modal language (sv-review, continue-design, etc.).
   ───────────────────────────────────────────────────────────────── */
.gender-change-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(14, 14, 15, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.32s ease;
  font-family: 'Jost', sans-serif;
  padding: 20px;
}

.gender-change-modal {
  background: #ffffff;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  max-width: 460px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  animation: slideUp 0.42s cubic-bezier(0.2, 0, 0, 1);
}

.gender-change-modal .modal-header {
  padding: 32px 32px 18px;
  text-align: center;
  border-bottom: 1px solid rgba(14, 14, 15, 0.08);
  background: #ffffff;
}

.gender-change-modal .modal-header h3 {
  margin: 0 0 10px 0;
  font-size: 22px;
  font-weight: 600;
  color: #0e0e0f;
  letter-spacing: 0.005em;
  font-family: 'Jost', sans-serif;
}

.gender-change-modal .modal-icon {
  color: rgba(14, 14, 15, 0.55);
  opacity: 1;
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.gender-change-modal .modal-content {
  padding: 22px 32px;
  background: #ffffff;
  font-family: 'Jost', sans-serif;
}

.warning-text {
  font-size: 13px;
  color: rgba(14, 14, 15, 0.75);
  margin: 0 0 16px 0;
  line-height: 1.55;
  font-family: 'Jost', sans-serif;
}

.current-design-summary {
  background: rgba(14, 14, 15, 0.03);
  border: 1px solid rgba(14, 14, 15, 0.08);
  border-radius: 4px;
  padding: 16px 18px;
  margin: 14px 0;
}

.current-design-summary h4 {
  margin: 0 0 10px 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(14, 14, 15, 0.55);
  font-family: 'Jost', sans-serif;
}

.current-design-summary ul {
  margin: 0;
  padding-left: 18px;
  color: rgba(14, 14, 15, 0.75);
  font-size: 13px;
  font-family: 'Jost', sans-serif;
}

.current-design-summary li {
  margin-bottom: 4px;
}

.warning-notice,
.info-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 4px;
  margin: 14px 0;
  font-family: 'Jost', sans-serif;
}

.warning-notice {
  background: rgba(196, 140, 30, 0.08);
  border: 1px solid rgba(196, 140, 30, 0.3);
}

.info-notice {
  background: rgba(41, 138, 48, 0.06);
  border: 1px solid rgba(41, 138, 48, 0.25);
}

.warning-icon,
.info-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
  filter: grayscale(0.2);
}

.warning-notice p,
.info-notice p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #0e0e0f;
  font-family: 'Jost', sans-serif;
}

.gender-change-modal .modal-actions {
  padding: 18px 32px 32px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid rgba(14, 14, 15, 0.08);
  background: #ffffff;
}

.gender-change-modal .btn-secondary,
.gender-change-modal .btn-primary,
.design-manager-modal .btn-secondary,
.design-manager-modal .btn-primary {
  padding: 12px 22px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Jost', sans-serif;
}

.gender-change-modal .btn-secondary,
.design-manager-modal .btn-secondary {
  background: transparent;
  color: rgba(14, 14, 15, 0.65);
}

.gender-change-modal .btn-secondary:hover,
.design-manager-modal .btn-secondary:hover {
  background: transparent;
  color: #0e0e0f;
  text-decoration: underline;
  text-underline-offset: 3px;
  transform: none;
  border-color: transparent;
}

.gender-change-modal .btn-primary,
.design-manager-modal .btn-primary {
  background: #0e0e0f;
  color: #ffffff;
  border-color: transparent;
}

.gender-change-modal .btn-primary:hover,
.design-manager-modal .btn-primary:hover {
  background: #298a30;
  transform: none;
  box-shadow: 0 6px 18px rgba(41, 138, 48, 0.3);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Design Manager Button */
#design-manager {
  position: relative;
}

.design-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0);
  transition: all 0.2s ease;
}

.design-count-badge.has-designs {
  opacity: 1;
  transform: scale(1);
}

.design-count-badge.pulse {
  animation: badgePulse 0.6s ease-out;
}

@keyframes badgePulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

/* Saved Designs Modal - Matching Main CSS Design System */
.design-manager-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(14, 14, 15, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.32s ease;
}

.design-manager-modal {
  background: #ffffff;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  max-width: 900px;
  width: 90%;
  max-height: 85vh;
  overflow: hidden;
  animation: slideUp 0.42s cubic-bezier(0.2, 0, 0, 1);
  font-family: 'Jost', sans-serif;
}

.design-manager-modal .modal-header {
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(14, 14, 15, 0.08);
  background: #ffffff;
}

.design-manager-modal .modal-header h3 {
  color: #0e0e0f;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.005em;
  font-family: 'Jost', sans-serif;
}

.close-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #64748b;
  font-size: 1.25rem;
}

.close-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.modal-content {
  max-height: calc(85vh - 140px);
  overflow-y: auto;
}

.current-design-info {
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.current-design-info h4 {
  margin: 0;
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.current-design-info .current-selection {
  color: #374151;
  font-weight: 600;
  font-size: 1rem;
}

.designs-section {
  padding: 1.5rem;
  background: #ffffff;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1rem;
}

.designs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
}

.design-card {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  transition: all 0.2s ease;
  position: relative;
  background: #ffffff;
  cursor: pointer;
}

.design-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.design-card.active {
  border-color: #374151;
  background: #f3f4f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(55, 65, 81, 0.2);
}

.design-card.current {
  border-color: #374151;
  background: #f3f4f6;
}

.design-card.empty {
  opacity: 0.6;
  cursor: default;
}

.design-card.empty:hover {
  transform: none;
  box-shadow: none;
  border-color: #e2e8f0;
}

.design-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.design-icon {
  width: 32px;
  height: 32px;
  background: #0e0e0f;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.design-card.empty .design-icon {
  background: #f1f5f9;
  color: #64748b;
}

.design-info h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

.design-card.empty .design-info h5 {
  color: #64748b;
}

.design-summary {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0.25rem 0 0 0;
  line-height: 1.4;
}

.design-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

.design-date {
  font-size: 0.75rem;
  color: #64748b;
}

.design-type-badge {
  font-size: 0.75rem;
  color: #374151;
  background: #f1f5f9;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.design-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.btn-small {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  background: #ffffff;
  color: #64748b;
}

.btn-small:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.btn-small.btn-primary {
  background: #0e0e0f;
  color: white;
  border: none;
}

.btn-small.btn-primary:hover {
  background: #298a30;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(41, 138, 48, 0.3);
}

.btn-small.btn-danger {
  background: #ef4444;
  color: white;
  border: none;
}

.btn-small.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.btn-small:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.current-indicator {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #0e0e0f;
  color: white;
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.modal-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 1.5rem;
}

.modal-footer .action-buttons {
  display: flex;
  gap: 0.75rem;
}

.modal-footer .btn-secondary {
  flex: 1;
  padding: 0.875rem 1.5rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.modal-footer .btn-secondary:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.modal-footer .btn-primary {
  flex: 2;
  padding: 0.875rem 1.5rem;
  border: none;
  background: #0e0e0f;
  color: white;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.modal-footer .btn-primary:hover {
  background: #298a30;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(41, 138, 48, 0.3);
}

.save-design-form {
  margin-bottom: 1rem;
}

.save-design-form .form-group {
  margin-bottom: 1rem;
}

.save-design-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.save-design-form input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #374151;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.save-design-form input:focus {
  outline: none;
  border-color: #374151;
  box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.1);
}

/* Save Notification */
.save-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #10b981;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
  z-index: 10001;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
}

.save-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.notification-icon {
  font-size: 1.1rem;
}

/* Image Upload Section */
.image-upload-section {
  margin-top: 20px;
  border-top: 1px solid #e5e7eb;
  padding-top: 20px;
}

.upload-label {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
}

.upload-subtitle {
  font-size: 0.85rem;
  font-weight: 400;
  color: #6b7280;
  margin-top: 4px;
}

/* 2026-05-10: upload zone redesign — hairline solid border replacing
   the 2px dashed grey rectangle that screamed "Figma mockup". Premium
   feel: white surface, hairline border, brand-dark CTA. F003 + F006. */
.upload-area {
  border: 1px solid rgba(14, 14, 15, 0.12);
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 0.2s ease, background 0.2s ease;
  overflow: hidden;
}

.upload-area.dragover {
  border-color: #298a30;
  background: rgba(41, 138, 48, 0.04);
}

.upload-dropzone {
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.upload-dropzone:hover {
  background: rgba(14, 14, 15, 0.02);
}

.upload-content h4 {
  margin: 12px 0 8px 0;
  font-size: 1rem;
  font-weight: 500;
  color: #0e0e0f;
  font-family: 'Jost', sans-serif;
}

.upload-content p {
  margin: 0 0 16px 0;
  font-size: 0.85rem;
  color: rgba(14, 14, 15, 0.55);
}

.upload-icon-large {
  color: rgba(14, 14, 15, 0.35);
  margin-bottom: 8px;
}
.upload-icon-large svg {
  display: block;
  margin: 0 auto;
}

/* F002: brand-dark with brand-green hover — matches the
   ghost+dark-with-green-hover hierarchy used elsewhere. F006: 6px
   radius matches the input/button standard. */
.upload-btn {
  background: #0e0e0f;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  font-family: 'Jost', sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.upload-btn:hover,
.upload-btn:focus-visible {
  background: #298a30;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(41, 138, 48, 0.28);
}

.upload-btn:active {
  transform: translateY(0);
}

/* 2026-05-10 (F009): label with leading upload-arrow icon. Signals
   the input is an upload at a glance, before reading the text. */
.sv-upload-label {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  color: rgba(14, 14, 15, 0.75);
  font-weight: 500;
}
.sv-upload-label svg {
  color: rgba(14, 14, 15, 0.5);
  flex-shrink: 0;
}

.uploaded-files {
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
  max-height: 300px;
  overflow-y: auto;
}

.uploaded-file {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  transition: all 0.2s ease;
}

.uploaded-file:hover {
  background: #f9fafb;
}

.uploaded-file:last-child {
  border-bottom: none;
}

.file-icon {
  font-size: 1.5rem;
  margin-right: 12px;
  flex-shrink: 0;
  color: #6b7280;
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-weight: 500;
  color: #374151;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.8rem;
  color: #6b7280;
}

.file-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.file-action-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.file-action-btn.preview {
  color: #374151;
  background: #f3f4f6;
}

.file-action-btn.preview:hover {
  background: #e5e7eb;
  color: #1f2937;
}

.file-action-btn.remove {
  color: #dc2626;
  background: #fef2f2;
}

.file-action-btn.remove:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.upload-info {
  padding: 16px;
  background: #fef3cd;
  border-top: 1px solid #fde68a;
}

.info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: #92400e;
  line-height: 1.4;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-item:before {
  content: "•";
  color: #d97706;
  margin-right: 8px;
  flex-shrink: 0;
}

/* File Preview Modal */
.file-preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.file-preview-modal {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.file-preview-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9fafb;
}

.file-preview-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #374151;
}

.file-preview-content {
  padding: 20px;
  text-align: center;
  max-height: 70vh;
  overflow: auto;
  background: #ffffff;
}

.file-preview-image {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.file-preview-pdf {
  width: 100%;
  height: 60vh;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

/* Upload Progress */
.upload-progress {
  padding: 12px 16px;
  background: #eff6ff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Empty State */
.upload-empty-state {
  padding: 40px 20px;
  text-align: center;
  color: #9ca3af;
  font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .upload-dropzone {
    min-height: 150px;
  }
}

/* MOBILE ONLY - Simple Nike-style bottom sheet */
@media (max-width: 768px) {
  .nike-bottom-sheet {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: white !important;
    border-radius: 20px 20px 0 0 !important;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1) !important;
    z-index: 9999 !important;
    max-height: 60vh !important;
    overflow-y: auto !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    transform: translateY(calc(100% - 80px)) !important;
    transition: transform 0.3s ease !important;
  }

  .nike-bottom-sheet.expanded {
    transform: translateY(0) !important;
  }

  .step-content {
    display: none !important;
  }

  .step-content.active {
    display: block !important;
  }

  .sheet-handle {
    width: 40px !important;
    height: 40px !important;
    background: #000 !important;
    border-radius: 50% !important;
    margin: 0 auto 20px auto !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .option-item {
    cursor: pointer !important;
    padding: 16px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    transition: all 0.2s ease !important;
  }

  .option-item.selected {
    border-color: #000 !important;
    background: #f9fafb !important;
  }

  .nav-done-btn,
  .nav-arrow {
    cursor: pointer !important;
    border: none !important;
    background: #000 !important;
    color: white !important;
    padding: 14px 24px !important;
    border-radius: 25px !important;
    font-size: 16px !important;
  }

  .nav-arrow {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: white !important;
    border: 2px solid #e5e7eb !important;
    color: #000 !important;
    padding: 0 !important;
  }

  .nav-arrow:disabled {
    opacity: 0.5 !important;
  }

  /* Ensure all navigation arrows have consistent styling */
  .step-header .nav-arrow {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
  }

  .step-header .nav-arrow:not(:disabled) {
    background: #000 !important;
    border: none !important;
    color: white !important;
  }

  .step-header .nav-arrow:disabled {
    background: #f3f4f6 !important;
    border: 2px solid #e5e7eb !important;
    color: #9ca3af !important;
  }

  /* Studs section - ensure arrows work consistently */
  .step-content[data-step="3"] .step-header .nav-arrow {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .step-content[data-step="3"] .step-header .nav-arrow:disabled {
    background: #f3f4f6 !important;
    border: 2px solid #e5e7eb !important;
    color: #9ca3af !important;
  }

  .step-content[data-step="3"] .step-header .nav-arrow:not(:disabled) {
    background: #000 !important;
    border: none !important;
    color: white !important;
  }

  /* Hide any potential duplicate "Swipe" text in stud options */
  .stud-option::after,
  .stud-option-content::after,
  .stud-section-mobile::after,
  .stud-option::before,
  .stud-option-content::before,
  .stud-section-mobile::before {
    content: none !important;
    display: none !important;
  }

  /* Ensure no text appears after toggle switches - but keep the toggle circle */
  /* .stud-toggle-switch::after {
    content: '' !important;
  } */
  /* Hide any text that might appear in stud options - but preserve toggle switch circle */
  .stud-option *::after:not(.stud-toggle-switch::after),
  .stud-option *::before:not(.stud-toggle-switch::before) {
    content: none !important;
  }

  /* Ensure toggle switch circle is visible */
  .stud-toggle-switch::after {
    content: '' !important;
    position: absolute !important;
    top: 2px !important;
    left: 2px !important;
    width: 20px !important;
    height: 20px !important;
    background: white !important;
    border-radius: 50% !important;
    transition: transform 0.3s ease !important;
    transform: translateX(0) translateZ(0) !important;
    -webkit-transform: translateX(0) translateZ(0) !important;
  }

  /* Mobile toggle switch checked state */
  .stud-option input[type="checkbox"]:checked+.stud-option-content .stud-toggle-switch {
    background: #1f2937 !important;
  }

  .stud-option input[type="checkbox"]:checked+.stud-option-content .stud-toggle-switch::after {
    transform: translateX(20px) translateZ(0) !important;
    -webkit-transform: translateX(20px) translateZ(0) !important;
  }

  /* MOBILE BASE CONFIGURATION FORM STYLING */
  .step-content select {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    background: white !important;
    color: #111827 !important;
    margin-bottom: 16px !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    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='currentColor' 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") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
  }

  .step-content select:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
  }

  .step-content label {
    display: block !important;
    font-size: 14px !important;
    color: #6b7280 !important;
    margin-bottom: 8px !important;
    font-weight: 500 !important;
  }

  /* Stud sections are now handled by flex layout in carousel */
  /* Stud Carousel System CSS */
  .stud-carousel-container {
    margin: 20px 0;
  }

  .stud-nav-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
  }

  .stud-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .stud-dot.active {
    background: #000;
    transform: scale(1.2);
  }

  .stud-carousel-wrapper {
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: relative;
  }

  .stud-carousel-wrapper::-webkit-scrollbar {
    display: none;
  }

  .stud-carousel {
    display: flex;
    width: 800%; /* 8 sections × 100% */
  }

  .stud-section-mobile {
    width: 12.5%; /* 100% / 8 sections */
    flex-shrink: 0;
    padding: 0 10px;
    scroll-snap-align: start;
  }

  .stud-section-mobile h3 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px 0;
    text-align: center;
  }

  /* Stud Options Styling - Mobile */
  .stud-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .stud-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
  }

  .stud-option:hover {
    border-color: #1f2937;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
  }

  .stud-option.active {
    border-color: #1f2937;
    background: rgba(31, 41, 55, 0.05);
    box-shadow: 0 0 0 1px rgba(31, 41, 55, 0.1);
  }

  .stud-option-label {
    font-size: 0.9rem;
    color: #374151;
    font-weight: 500;
    flex-grow: 1;
    margin: 0;
    cursor: pointer;
  }

  .stud-option.active .stud-option-label {
    color: #1f2937;
    font-weight: 600;
  }

  .stud-option input[type="checkbox"] {
    display: none;
  }

  /* Toggle animation - PURE CSS (works on all browsers) */
  .stud-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #d1d5db;
    border-radius: 12px;
    transition: background 0.3s ease;
    flex-shrink: 0;
    margin-left: 12px;
  }

  .stud-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    /* CRITICAL: Force hardware acceleration */
    will-change: transform;
    transform: translateX(0) translateZ(0);
    -webkit-transform: translateX(0) translateZ(0);
  }

  /* CHECKED STATE - Single source of truth */
  .stud-option input[type="checkbox"]:checked+.stud-option-content .stud-toggle-switch {
    background: #1f2937;
  }

  .stud-option input[type="checkbox"]:checked+.stud-option-content .stud-toggle-switch::after {
    transform: translateX(20px) translateZ(0);
    -webkit-transform: translateX(20px) translateZ(0);
  }

  .stud-option-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  /* Hide the big black "Next" button on all pages */
  .nav-done-btn {
    display: none !important;
  }
}

/* Upload Content Styles */
.upload-content {
  padding: 24px 16px;
}

.upload-icon-large {
  font-size: var(--text-3xl);
}

.upload-content h4 {
  font-size: 1rem;
}

.uploaded-file {
  padding: 10px 12px;
}

.file-item .file-name {
  font-size: 0.9rem;
}

/* Upload Notifications */
.upload-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  z-index: 10001;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 400px;
}

.upload-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.upload-notification.success {
  background: #10b981;
  color: white;
}

.upload-notification.error {
  background: #ef4444;
  color: white;
}

.upload-notification .notification-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Custom text section styling */
.custom-text.config-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  /* Increased from 16px to give more breathing room as requested */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-text-header {
  background: #e2e8f0;
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #374151;
  user-select: none;
}

.custom-text-header:hover {
  background: #cbd5e1;
}

.custom-text-content {
  padding: 16px;
  display: none;
}

.custom-text-section.expanded .custom-text-content {
  display: block;
}

.custom-text-section.expanded .custom-text-toggle {
  transform: rotate(180deg);
}

.custom-text-toggle {
  transition: transform 0.3s ease;
  font-size: 12px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  font-size: 14px;
}

.form-group textarea,
.form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea::placeholder {
  color: #9ca3af;
}

.disclaimer-text {
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
  margin-top: 12px;
  padding: 8px 12px;
  background: #f3f4f6;
  border-left: 3px solid #fbbf24;
}

/* ====================================================================
   BADGE SYSTEM STYLES - Seamlessly integrated with existing design
   ==================================================================== */
/* Badge Controls Grid */
.badge-controls-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.badge-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.badge-control-group label {
  font-weight: 600;
  color: var(--color-primary);
  font-size: 14px;
}

/* Badge Size Slider */
.slider-input {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: 2px solid var(--color-white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider-input::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: 2px solid var(--color-white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider-value {
  font-size: 12px;
  color: var(--color-text-secondary);
  font-weight: 600;
  text-align: center;
  background: var(--color-bg-light);
}

.fixed-size-display {
  font-size: 12px;
  color: var(--color-text-secondary);
  font-weight: 600;
  text-align: center;
  background: var(--color-bg-light);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  align-self: flex-start;
}

/* Badge Control Buttons */
.badge-control-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.control-btn {
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-white);
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.control-btn:hover {
  background: var(--color-bg-light);
  border-color: var(--color-border-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.control-btn.delete-btn {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

.control-btn.delete-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.control-btn.clear-btn {
  color: #7c3aed;
  border-color: #ddd6fe;
  background: #f5f3ff;
}

.control-btn.clear-btn:hover {
  background: #ede9fe;
  border-color: #c4b5fd;
}

.control-btn.place-btn {
  color: #059669;
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.control-btn.place-btn:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
}

.control-btn.place-btn.active {
  background: #065f46;
  color: white;
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.3);
}

/* Badge Instructions */
.badge-instructions {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.instruction-step {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.instruction-step:last-child {
  margin-bottom: 0;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.step-text {
  font-size: 14px;
  color: var(--color-primary);
  line-height: 1.4;
}

/* Badge Status — 2026-05-10: dark default, brand-green when placement
   mode is active. Reads as a strong CTA signalling "this is actionable",
   then confirms with green once the user has taken the action. */
.badge-status {
  background: #0e0e0f;
  border: 1px solid #0e0e0f;
  border-radius: 6px;
  padding: 12px 16px;
  text-align: center;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.status-text {
  font-size: 14px;
  color: #ffffff;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.25s ease;
}

/* Active state: jacket.js adds 'placement-mode' class to body when the
   user has armed the badge for placement. Status flips to brand-green. */
body.placement-mode .badge-status {
  background: #298a30;
  border-color: #298a30;
  box-shadow: 0 0 0 4px rgba(41, 138, 48, 0.15);
}

/* Badge Preview */
.badge-preview-container {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.badge-preview {
  width: 100%;
  height: 120px;
  /* 2026-05-10: hairline solid border replacing dashed 2px — kills the
     generic Figma-mockup feel. */
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: var(--color-white);
  position: relative;
  overflow: hidden;
}

.badge-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(14, 14, 15, 0.45);
}

.preview-icon {
  /* Hairline SVG (replaces 🖼️ emoji) — premium, OS-consistent, brand-dark. */
  display: inline-flex;
  width: 32px;
  height: 32px;
  color: rgba(14, 14, 15, 0.35);
}
.preview-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.preview-text {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(14, 14, 15, 0.55);
}

.badge-count {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 8px 12px;
  display: inline-block;
}

.count-text {
  font-size: 14px;
  color: var(--color-primary);
  font-weight: 600;
}

/* File Input Styling */
.file-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-white);
  color: var(--color-primary);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.file-input:hover {
  border-color: var(--color-border-hover);
}

.file-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* DESKTOP ONLY - Hide mobile bottom sheet on desktop */
@media (min-width: 769px) {
  .nike-bottom-sheet {
    display: none !important;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .badge-control-buttons {
    flex-direction: column;
  }

  .control-btn {
    width: 100%;
    justify-content: center;
  }

  .badge-preview {
    height: 100px;
  }
}

/* ====================================================================
   FIX: Always-visible price/action footer (desktop ≥ 1025px)
   ──────────────────────────────────────────────────────────────────
   panel-footer is fixed to the viewport, aligned to the right column:
     right: max(0px, calc((100vw - 1600px) / 2))

   This works with the wrapper's max-width:1600px; margin:0 auto so
   the footer always sits inside the config-panel column on any screen.
   Works regardless of ancestor overflow settings (Shopify-safe).
   panel-content gets padding-bottom so no options hide behind it.
   Mobile ≤ 1024px: panel-footer is hidden — Nike bottom sheet used.
   ==================================================================== */
.config-panel {
  overflow: hidden !important;
  /* 2026-05-10 v2: Use 100% of grid parent (customizer-main-layout) so
     the panel matches the viewer column height — no dead zone below the
     price footer. Layout container is height-locked to viewport so flex
     children still constrain. */
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
}

/* 2026-05-10 v3: layout fills whatever the wrapper has left after the
   sticky nav. Wrapper is now flex column with height: calc(100vh - 80px)
   so the layout = wrapper - nav (~934 on a 1100 viewport). Nav can be
   any height — flex math handles it. minmax(0,1fr) on rows keeps grid
   children from overflowing the layout. */
.customizer-main-layout {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  grid-template-rows: minmax(0, 1fr) !important;
}

.panel-content {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  /* Hard cap so even if flex:1 mis-fires, the scroll container can't
     overflow its parent. 220px padding-bottom keeps options clear of the
     fixed pricing footer. */
  max-height: 100% !important;
  padding-bottom: 220px !important;
}

/* Base footer styles — always applied */
.panel-footer {
  z-index: 500;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
}

/* Fixed state: config panel extends below viewport (normal scroll-down use) */
.panel-footer.sv-footer-fixed {
  position: fixed !important;
  bottom: 0 !important;
  /* 2026-05-10 v4: anchor to the wrapper's right edge (not viewport's)
     so the price box stays vertically aligned under the actual panel
     when the user scrolls. Wrapper is centred at max-width: 1900px,
     so right offset = (100vw - 1900px) / 2 — clamped to 0 on viewports
     narrower than 1900. Footer was jumping 50px to the right of the
     panel during scroll because it was anchored to viewport-right. */
  right: max(0px, calc((100vw - 1900px) / 2)) !important;
  width: 400px !important;
}

/* Docked state: config panel bottom is in view (user scrolled up to Shopify footer) */
.panel-footer.sv-footer-docked {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
}

@media (max-width: 1024px) {
  .config-panel {
    max-height: none !important;
    overflow: visible !important;
  }

  .panel-content {
    padding-bottom: 1rem !important;
  }

  .panel-footer {
    display: none !important;
  }
}

/* ====================================================================
   UI: CONDENSED PANEL HEADER & FOOTER — reduce vertical real estate
   ==================================================================== */

/* Panel Header — "Select Options" title bar */
.panel-header {
  padding: 0.6rem 1.5rem !important;
}

.panel-header h1,
.panel-header h2,
.panel-header .panel-title {
  font-size: 1rem !important;
  margin-bottom: 0.15rem !important;
}

.progress-text {
  font-size: 0.75rem !important;
  line-height: 1.2 !important;
  font-weight: 400 !important;
  color: rgba(14, 14, 15, 0.5) !important;
  letter-spacing: 0.02em !important;
}

/* Panel Footer — pricing box + action buttons */
.panel-footer {
  padding: 0.6rem 1rem !important;
}

.panel-content {
  padding-bottom: 160px !important;
}

.price-summary {
  margin-bottom: 0.4rem !important;
}

.price-breakdown {
  padding: 0.4rem 0.75rem !important;
}

.price-line {
  padding: 0.15rem 0 !important;
  font-size: 0.8rem !important;
}

.price-total {
  padding: 0.4rem 0 0.15rem !important;
  margin-top: 0.25rem !important;
  font-size: 1rem !important;
}

.action-buttons {
  gap: 0.5rem !important;
}

.btn-secondary,
.btn-primary {
  padding: 0.55rem 1.25rem !important;
}

/* ====================================================================
   FIX: 3D VIEWPORT CONTAINER WIDTH - MAKE IT WIDER AND RESPONSIVE
   ==================================================================== */

/* Remove gray background from viewer section */
.viewer-section {
  background: transparent !important;
}

/* ====================================================================
   FIX: FULLSCREEN MODE - HIDE CONFIG PANEL AND EXPAND VIEWER
   ==================================================================== */

/* Hide config panel in fullscreen mode */
.jacket-customizer-wrapper.fullscreen-mode .config-panel {
  display: none !important;
}

/* Make viewer take full width in fullscreen */
.jacket-customizer-wrapper.fullscreen-mode .customizer-main-layout {
  grid-template-columns: 1fr !important;
}

/* Ensure viewer section expands to full width */
.jacket-customizer-wrapper.fullscreen-mode .viewer-section {
  width: 100% !important;
}

/* Change background from black to white in fullscreen */
.jacket-customizer-wrapper.fullscreen-mode {
  background: #ffffff !important;
}

/* Centre the viewer container and make it fill available space.
   FIX 2026-05-10: removed hardcoded linear-gradient background — let the
   theme toggle (light/dark) show through in fullscreen too. */
.jacket-customizer-wrapper.fullscreen-mode .viewer-container {
  width: 100vw !important;
  height: calc(100vh - 60px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Make the 3D canvas fill the container responsively */
.jacket-customizer-wrapper.fullscreen-mode #3d-preview-container {
  width: 100vw !important;
  height: calc(100vh - 60px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Force canvas to viewport-edge in fullscreen — beats the 1200/1400px caps
   from the @media (min-width: 1024/1440) rules above. No object-fit: contain
   because Three.js renders at the canvas's exact pixel buffer size, set by
   threeRenderer.setSize() during enterFullscreen. */
.jacket-customizer-wrapper.fullscreen-mode #3d-preview-canvas {
  width: 100vw !important;
  height: calc(100vh - 60px) !important;
  max-width: 100vw !important;
  max-height: calc(100vh - 60px) !important;
}

/* Override the minified .viewer-container styles to make it wider */
.viewer-container {
  flex: 1 !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  min-height: 600px !important;
  width: 100% !important;
  padding: 0 !important;
}

/* Make the canvas element wider and more responsive */
#3d-preview-canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
  display: block !important;
  opacity: 0 !important;
  transition: opacity 1s ease-in-out !important;
}

#3d-preview-canvas.fade-in {
  opacity: 1 !important;
}

/* Desktop: Even wider for better jacket visibility */
@media (min-width: 1024px) {
  .viewer-container {
    min-height: 700px !important;
    padding: 0 !important;
  }
}

@media (min-width: 1440px) {
  .viewer-container {
    min-height: 800px !important;
    padding: 0 !important;
  }
}

/* Mobile: reset desktop min-height so the container defers to .viewer-section */
@media (max-width: 1024px) {
  .viewer-container {
    min-height: 300px !important;
    padding: 0 !important;
  }
}

/* ====================================================================
   S&V BADGE SELECTION SYSTEM STYLES - NEW
   ==================================================================== */

/* Category Filter Buttons */
.sv-badge-category-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.sv-category-btn {
  padding: 8px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sv-category-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.sv-category-btn.active {
  background: #0e0e0f;
  color: #ffffff;
  border-color: #374151;
  box-shadow: 0 2px 4px rgba(55, 65, 81, 0.2);
}

/* Badge Gallery Container */
.sv-badge-gallery {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

/* Badge Gallery Grid - Desktop (4-5 columns) */
.sv-badge-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  max-height: 500px;
  overflow-y: auto;
  padding: 4px;
}

/* Badge Thumbnail Card */
.sv-badge-thumbnail {
  position: relative;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 160px;
  touch-action: manipulation;
  /* Prevent double-tap zoom, allow single tap */
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  /* Visual feedback on tap */
  user-select: none;
  /* Prevent text selection on touch */
}

.sv-badge-thumbnail:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sv-badge-thumbnail.selected {
  border-color: #374151;
  background: #f3f4f6;
  box-shadow: 0 0 0 2px rgba(55, 65, 81, 0.2);
}

/* Consolidated Luxury Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
}

.section-header:hover {
  background: #fdfdfd;
}

.config-section.expanded .section-header {
  background: transparent;
  box-shadow: none;
  border-left: 0;
}

.section-number {
  width: 28px;
  height: 28px;
  background: #f1f5f9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin-right: 16px;
  transition: all 0.3s ease;
}

.config-section.expanded .section-number {
  background: #111827;
  color: #fff;
  transform: scale(1.1);
}

.sv-badge-thumbnail.selected::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: #0e0e0f;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Badge Image Container - ASPECT RATIO PRESERVATION */
.sv-badge-image {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 4px;
  overflow: hidden;
  /* Default aspect ratio (square) - will be overridden by data attribute */
  aspect-ratio: 1 / 1;
}

/* Aspect ratio preservation for different badge types */
.sv-badge-image[data-aspect-ratio="1.0"] {
  aspect-ratio: 1 / 1;
}

.sv-badge-image[data-aspect-ratio="1.17"] {
  aspect-ratio: 1.17 / 1;
}

.sv-badge-image[data-aspect-ratio="1.5"] {
  aspect-ratio: 1.5 / 1;
}

.sv-badge-image[data-aspect-ratio="0.67"] {
  aspect-ratio: 0.67 / 1;
}

.sv-badge-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Ensure image respects container aspect ratio */
  display: block;
}

/* Badge Info */
.sv-badge-info {
  text-align: center;
  width: 100%;
}

.sv-badge-name {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
  line-height: 1.2;
}

.sv-badge-price {
  font-size: 14px;
  font-weight: 700;
  color: #059669;
}

/* Badge Tags */
.sv-badge-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.sv-badge-tag {
  font-size: 10px;
  padding: 2px 6px;
  background: #e2e8f0;
  color: #64748b;
  border-radius: 3px;
}

/* Popular/New/Limited Badges */
.sv-badge-thumbnail.popular .sv-badge-image::before {
  content: '🔥';
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 16px;
}

.sv-badge-thumbnail.new .sv-badge-image::after {
  content: 'NEW';
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  background: #10b981;
  color: #ffffff;
  border-radius: 3px;
}

.sv-badge-thumbnail.limited .sv-badge-image::after {
  content: 'LIMITED';
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  background: #ef4444;
  color: #ffffff;
  border-radius: 3px;
}

/* Loading State */
.sv-badge-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #64748b;
}

.sv-badge-loading .spinner {
  margin-bottom: 12px;
}

/* Selected Badges List */
.sv-selected-badges-list {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 12px;
  min-height: 60px;
}

.sv-no-selection {
  color: #9ca3af;
  font-size: 14px;
  text-align: center;
  margin: 0;
  padding: 20px;
}

.sv-selected-badge-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  margin-bottom: 8px;
}

.sv-selected-badge-item:last-child {
  margin-bottom: 0;
}

.sv-selected-badge-name {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.sv-selected-badge-price {
  font-size: 14px;
  font-weight: 700;
  color: #059669;
}

.sv-remove-badge-btn {
  padding: 4px 8px;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sv-remove-badge-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

/* Badge Pricing Summary */
.sv-badge-pricing {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
}

/* ====================================================================
   FLOATING BADGE TOOLBAR - CONTEXTUAL CONTROLS
   ==================================================================== */

/* Floating Badge Toolbar - Compact icon pill bar */
.floating-badge-toolbar {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  animation: fadeInDown 0.3s ease;
  pointer-events: auto;
}

.toolbar-content {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* Toolbar icon buttons — matches .icon-btn design system */
.toolbar-icon-btn {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-family: inherit;
}

.toolbar-icon-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.toolbar-icon-btn .toolbar-icon {
  flex-shrink: 0;
  pointer-events: none;
}

/* Ensure ALL children inside toolbar buttons pass clicks to the <button> */
.toolbar-icon-btn * {
  pointer-events: none;
}

/* Active/toggled state — dark fill matching .view-btn.active */
.toolbar-icon-btn.active {
  background: #1f2937;
  border-color: #1f2937;
  color: white;
}

.toolbar-icon-btn.active:hover {
  background: #374151;
  border-color: #374151;
  color: white;
}

/* Clear All confirmation state */
.toolbar-icon-btn.toolbar-clear-btn.confirming {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.toolbar-icon-btn.toolbar-clear-btn.confirming:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
}

/* Toolbar divider */
.toolbar-divider {
  width: 1px;
  height: 20px;
  background: #e2e8f0;
  flex-shrink: 0;
}

/* Badge count chip */
.toolbar-badge-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 12px;
  background: #1f2937;
  color: white;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  line-height: 1;
}

/* Button labels — hidden on small screens */
.toolbar-btn-label {
  pointer-events: none;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ====================================================================
   DEBUG BADGE SIZE CALIBRATION PANEL
   ==================================================================== */

.debug-calibration-panel {
  display: none !important;
  /* HIDDEN */
  position: fixed;
  /* Changed from absolute to fixed for better visibility */
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  /* Increased z-index to ensure it's above everything */
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  min-width: 320px;
  max-width: 400px;
  animation: fadeInUp 0.3s ease;
  display: none;
  pointer-events: auto;
  /* Ensure panel is clickable */
}

.debug-calibration-panel.show {
  display: block !important;
  /* Added !important to ensure visibility */
}

.debug-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #fef3cd;
}

.debug-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.debug-panel-close {
  width: 28px;
  height: 28px;
  border: none;
  background: #fef3cd;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #92400e;
  font-size: 18px;
  font-weight: 600;
}

.debug-panel-close:hover {
  background: #fde68a;
  transform: scale(1.1);
}

.debug-badge-info {
  background: #fef3cd;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.debug-badge-name {
  font-size: 14px;
  font-weight: 600;
  color: #78350f;
  margin-bottom: 4px;
}

.debug-badge-type {
  font-size: 12px;
  color: #92400e;
  font-style: italic;
}

.debug-size-control {
  margin-bottom: 16px;
}

.debug-size-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.debug-size-label-text {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.debug-size-value {
  font-size: 14px;
  font-weight: 700;
  color: #f59e0b;
  background: #fef3cd;
  padding: 4px 12px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
}

.debug-size-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #fef3cd 0%, #fde68a 50%, #fbbf24 100%);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.debug-size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f59e0b;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
}

.debug-size-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.6);
}

.debug-size-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f59e0b;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
}

.debug-size-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.6);
}

.debug-size-range {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11px;
  color: #6b7280;
  font-family: 'Courier New', monospace;
}

.debug-actions {
  display: flex;
  gap: 8px;
}

.debug-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.debug-btn-export {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.debug-btn-export:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.debug-btn-reset {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.debug-btn-reset:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.debug-calibration-count {
  margin-top: 12px;
  padding: 8px 12px;
  background: #f3f4f6;
  border-radius: 6px;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsive - 3 columns with horizontal scroll */
@media (max-width: 768px) {

  /* Floating Toolbar Mobile Adjustments */
  .floating-badge-toolbar {
    top: 8px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    padding: 5px 6px;
    max-width: calc(100vw - 20px);
  }

  .toolbar-content {
    flex-direction: row;
    gap: 4px;
    flex-wrap: nowrap;
  }

  /* Hide text labels on mobile — icon-only */
  .toolbar-btn-label {
    display: none;
  }

  .toolbar-icon-btn {
    padding: 0 8px;
    height: 32px;
  }

  .toolbar-divider {
    height: 16px;
  }

  .toolbar-badge-chip {
    min-width: 22px;
    height: 22px;
    font-size: 11px;
  }

  @keyframes fadeInDown {
    from {
      opacity: 0;
      transform: translateX(-50%) translateY(-10px);
    }

    to {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }
  }

  /* "Done placing" label stays visible on mobile — override the global label-hide rule */
  #floating-done-placing-btn {
    display: flex;
  }

  /* S&V Badge Gallery Mobile */
  .config-panel-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 0 100px;
    /* Added 100px bottom padding to ensure size selection isn't blocked by footer */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
  }

  .sv-badge-category-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .sv-badge-category-filters::-webkit-scrollbar {
    display: none;
  }

  .sv-category-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .sv-badge-gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    max-height: 380px;
  }

  .sv-badge-thumbnail {
    padding: 6px;
    min-height: 110px;
  }

  .sv-badge-image {
    height: 48px;
  }

  .sv-badge-name {
    font-size: 10px;
  }

  .sv-badge-price {
    font-size: 10px;
  }
}

/* Favorites System (for future enhancement) */
.sv-favorite-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1;
}

.sv-favorite-btn:hover {
  background: #ffffff;
  transform: scale(1.1);
}

.sv-favorite-btn.favorited {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

/* Badge Color Debug Panel Slider Styling */
#badge-color-debug-panel input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.2s;
}

#badge-color-debug-panel input[type="range"]::-webkit-slider-thumb:hover {
  background: #2563eb;
  transform: scale(1.1);
}

#badge-color-debug-panel input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.2s;
}

#badge-color-debug-panel input[type="range"]::-moz-range-thumb:hover {
  background: #2563eb;
  transform: scale(1.1);
}

#badge-color-debug-panel button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#badge-color-debug-panel button:active {
  transform: translateY(0);
}

#badge-color-debug-toggle:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
}

/* Notification animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  to {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
}

/* Desktop positioning (default) */
#badge-size-debug-panel {
  display: block;
}

/* Mobile/Tablet adjustments (≤768px) */
@media (max-width: 768px) {
  #badge-size-debug-panel {
    top: 10px !important;
    right: 10px !important;
    left: 10px !important;
    width: auto !important;
    max-width: calc(100vw - 20px) !important;
    font-size: 14px !important;
  }

  #badge-size-debug-panel>div:first-child {
    /* Header */
    padding: 10px 12px !important;
    font-size: 14px !important;
  }

  #badge-size-debug-panel>div:last-child {
    /* Content */
    padding: 12px !important;
  }

  #size-slider {
    height: 12px !important;
    /* Larger touch target for mobile */
  }

  #badge-size-debug-panel button {
    padding: 12px !important;
    /* Larger touch targets */
    font-size: 14px !important;
  }

  /* Adjust instructions text for mobile */
  #badge-size-debug-panel div[style*="line-height: 1.6"] {
    font-size: 12px !important;
  }
}

/* Small mobile devices (≤480px) */
@media (max-width: 480px) {
  #badge-size-debug-panel {
    top: 5px !important;
    right: 5px !important;
    left: 5px !important;
    max-width: calc(100vw - 10px) !important;
    font-size: 13px !important;
  }

  #badge-size-debug-panel>div:first-child {
    padding: 8px 10px !important;
    font-size: 13px !important;
  }

  #badge-size-debug-panel>div:last-child {
    padding: 10px !important;
  }

  #badge-size-debug-panel button {
    padding: 10px !important;
    font-size: 13px !important;
  }
}

/* DEVICE-SPECIFIC MOBILE IMPROVEMENTS */
@media (max-width: 768px) {

  /* Hide desktop configuration panel on mobile */
  #desktop-config-panel {
    display: none !important;
  }

  /* Fix mobile view buttons position - prevent movement */
  .view-buttons {
    position: fixed !important;
    top: 80px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 100 !important;
    display: flex !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: auto !important;
  }

  /* iPhone 16 Pro Max (430px) - Large flagship optimization */
  @media (min-width: 430px) {
    .nike-bottom-sheet {
      padding: 24px 20px !important;
      max-height: 75vh !important;
    }

    .step-content select {
      font-size: 17px !important;
      padding: 14px 18px !important;
    }
  }

  /* iPhone 16 Pro (393px) - High-end flagship optimization */
  @media (min-width: 393px) and (max-width: 429px) {
    .nike-bottom-sheet {
      padding: 22px 18px !important;
      max-height: 72vh !important;
    }

    .step-content select {
      font-size: 16px !important;
      padding: 13px 17px !important;
    }
  }

  /* iPhone 15/14/13 (390px) - Widely used optimization */
  @media (min-width: 390px) and (max-width: 392px) {
    .nike-bottom-sheet {
      padding: 20px 16px !important;
      max-height: 70vh !important;
    }

    .step-content select {
      font-size: 16px !important;
      padding: 12px 16px !important;
    }
  }

  /* Galaxy S25/S24 (360px) - Android flagship optimization */
  @media (min-width: 360px) and (max-width: 389px) {
    .nike-bottom-sheet {
      padding: 18px 14px !important;
      max-height: 68vh !important;
    }

    .step-content select {
      font-size: 15px !important;
      padding: 11px 15px !important;
    }
  }

  /* Smaller devices - Minimal optimization */
  @media (max-width: 359px) {
    .nike-bottom-sheet {
      padding: 16px 12px !important;
      max-height: 65vh !important;
    }

    .step-content select {
      font-size: 14px !important;
      padding: 10px 14px !important;
    }
  }

  /* Universal mobile improvements */
  .step-content select:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
  }

  .step-content label {
    display: block !important;
    font-size: 14px !important;
    color: #6b7280 !important;
    margin-bottom: 8px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
  }

  /* Prevent text cutoff */
  .step-content {
    overflow: visible !important;
  }

  .step-content * {
    box-sizing: border-box !important;
  }
}

/* Zoom Help Popup - Clean White Theme (matching loading popup) */
.zoom-help {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(3px);
  color: #374151;
  border: none;
  border-radius: 12px;
  padding: 0;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  max-width: 300px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  min-width: 280px;
}

.zoom-help.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.zoom-help-content {
  padding: 24px;
  text-align: center;
}

.zoom-help h4 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
}

.zoom-help ul {
  margin: 0 0 16px 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  text-align: left;
}

.zoom-help li {
  margin-bottom: 6px;
}

.zoom-help p {
  margin: 0 0 20px 0;
  font-style: italic;
  color: #6b7280;
  font-size: 13px;
}

.zoom-help-close {
  display: block;
  width: 100%;
  background: #1a1a1a;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
}

/* Brand-green hover so the modal CTA stays on-theme (matches the
   ghost+dark-with-green-hover button hierarchy used elsewhere). */
.zoom-help-close:hover,
.zoom-help-close:focus-visible,
.zoom-help-close:active {
  background: #298a30;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(41, 138, 48, 0.32);
}

/* Base Configuration Card - Initial collapsed state */
.nike-bottom-sheet {
  transform: translateY(calc(100% - 80px)) !important;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.nike-bottom-sheet.expanded {
  transform: translateY(0) !important;
}

/* Remove the gray overlay - we want clean white popup without background overlay */

/* =============================================================================
   MOBILE LAYOUT FIXES - Hide desktop elements on mobile, optimize for touch
   ============================================================================= */
@media (max-width: 768px) {

  /* CRITICAL: HIDE DESKTOP TOP NAVIGATION BAR ON MOBILE - This removes duplicate view buttons */
  .customizer-top-nav {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  /* CRITICAL: HIDE ALL DESKTOP VIEW SELECTORS ON MOBILE */
  .view-selector {
    display: none !important;
  }

  /* CRITICAL: HIDE MOBILE VIEW BUTTONS - We're using bottom sheet for mobile navigation */
  .view-buttons,
  #mobile-view-buttons {
    display: none !important;
    visibility: hidden !important;
  }

  /* HIDE DESKTOP CONFIG PANEL ON MOBILE - Nike bottom sheet replaces it */
  .config-panel {
    display: none !important;
  }

  /* MOBILE MAIN LAYOUT - Full width, no grid */
  .customizer-main-layout {
    display: block !important;
    grid-template-columns: none !important;
    min-height: calc(100vh - 100px) !important;
  }

  /* MOBILE 3D VIEWER - Takes full screen above bottom sheet */
  .viewer-section {
    height: calc(100vh - 160px) !important;
    min-height: 300px !important;
    max-height: 60vh !important;
    background: #f8fafc !important;
  }

  .viewer-container {
    height: 100% !important;
    min-height: 280px !important;
  }

  #3d-preview-container {
    height: 100% !important;
    min-height: 280px !important;
  }

  /* MOBILE NIKE BOTTOM SHEET - Always visible, starts expanded */
  .nike-bottom-sheet {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: white !important;
    border-radius: 24px 24px 0 0 !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15) !important;
    z-index: 9999 !important;
    max-height: 65vh !important;
    overflow-y: auto !important;
    padding: 16px 20px 24px 20px !important;
    /* START EXPANDED ON MOBILE so users can see customization options */
    transform: translateY(0) !important;
    transition: transform 0.3s ease !important;
  }

  /* Sheet handle - clickable area to collapse/expand */
  .sheet-handle {
    width: 40px !important;
    height: 5px !important;
    background: #d1d5db !important;
    border-radius: 3px !important;
    margin: 0 auto 16px auto !important;
    cursor: pointer !important;
  }

  /* Step content visibility */
  .step-content {
    display: none !important;
  }

  .step-content.active {
    display: block !important;
  }

  /* Mobile step header */
  .step-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 20px !important;
  }

  /* Navigation arrows */
  .nav-arrow {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border: 2px solid #e5e7eb !important;
    background: white !important;
    color: #374151 !important;
  }

  .nav-arrow:not(:disabled):hover {
    background: #000 !important;
    border-color: #000 !important;
    color: white !important;
  }

  .nav-arrow:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
  }

  /* Option items - touch-friendly */
  .option-item {
    cursor: pointer !important;
    padding: 16px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    margin-bottom: 8px !important;
    transition: all 0.2s ease !important;
    min-height: 48px !important;
  }

  .option-item.selected,
  .option-item:active {
    border-color: #000 !important;
    background: #f9fafb !important;
  }

  /* Mobile denim color options */
  .denim-color-option {
    min-width: 60px !important;
    min-height: 60px !important;
    border-radius: 12px !important;
    margin: 4px !important;
  }

  /* Mobile Add to Cart button */
  #mobile-add-to-cart-btn {
    width: 100% !important;
    padding: 16px 24px !important;
    background: #000 !important;
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-top: 16px !important;
  }

  #mobile-add-to-cart-btn:hover,
  #mobile-add-to-cart-btn:active {
    background: #1a1a1a !important;
    transform: translateY(-1px) !important;
  }

  /* Hide desktop elements that might interfere */
  .panel-footer {
    display: none !important;
  }

  .price-summary {
    display: none !important;
  }

  /* Make sure wrapper doesn't have excess padding */
  .jacket-customizer-wrapper {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
}

/* ====================================================================
   CROSS-BROWSER FIX: Utility Buttons (nav-right icons)
   BULLETPROOF SOLUTION - Works across Chrome, Safari, Firefox, Edge
   Overrides CSS reset (all: unset) with maximum specificity
   ==================================================================== */

/* Restore button element behavior after CSS reset */
.jacket-customizer-wrapper button,
.jacket-customizer-wrapper .nav-right button,
.jacket-customizer-wrapper .icon-btn,
.jacket-customizer-wrapper .action-btn {
  /* Reset appearance for cross-browser consistency */
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;

  /* Restore button basics that 'all: unset' removes */
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: normal !important;
  text-align: center !important;
  text-decoration: none !important;

  /* Ensure proper display */
  display: inline-flex !important;
  position: relative !important;
}

/* Force explicit colors on icon buttons - MAXIMUM SPECIFICITY */
.jacket-customizer-wrapper .nav-right .icon-btn,
.jacket-customizer-wrapper .nav-right .action-btn,
.jacket-customizer-wrapper #reset-customizer,
.jacket-customizer-wrapper #refresh-btn,
.jacket-customizer-wrapper #screenshot-btn,
.jacket-customizer-wrapper #save-btn,
.jacket-customizer-wrapper #fullscreen-btn,
.nav-right .icon-btn,
.nav-right .action-btn,
#reset-customizer,
#refresh-btn,
#screenshot-btn,
#save-btn,
#fullscreen-btn {
  /* EXPLICIT BACKGROUND - Multiple declarations for browser compatibility */
  background-color: #ffffff !important;
  background-image: none !important;
  background: #ffffff !important;

  /* EXPLICIT BORDER */
  border-width: 1px !important;
  border-style: solid !important;
  border-color: #e2e8f0 !important;
  border: 1px solid #e2e8f0 !important;

  /* EXPLICIT TEXT/ICON COLOR — soft brand black, lifts on hover */
  color: rgba(14, 14, 15, 0.7) !important;

  /* ENSURE VISIBILITY */
  opacity: 1 !important;
  visibility: visible !important;

  /* CROSS-BROWSER BOX SIZING */
  -webkit-box-sizing: border-box !important;
  -moz-box-sizing: border-box !important;
  box-sizing: border-box !important;

  /* CONSISTENT SIZING */
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;

  /* CENTER CONTENT - Flexbox */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: row !important;

  /* BORDER RADIUS */
  border-radius: 8px !important;
  -webkit-border-radius: 8px !important;
  -moz-border-radius: 8px !important;

  /* CURSOR */
  cursor: pointer !important;

  /* TRANSITIONS */
  -webkit-transition: all 0.2s ease !important;
  -moz-transition: all 0.2s ease !important;
  transition: all 0.2s ease !important;

  /* PREVENT TEXT SELECTION */
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  user-select: none !important;

  /* PADDING/MARGIN RESET */
  padding: 0 !important;
  margin: 0 !important;

  /* PREVENT OUTLINE ON CLICK (use focus state instead) */
  outline: none !important;
}

/* Ensure SVG icons inherit color properly - MAXIMUM SPECIFICITY */
.jacket-customizer-wrapper .nav-right .icon-btn svg,
.jacket-customizer-wrapper .nav-right .action-btn svg,
.jacket-customizer-wrapper #reset-customizer svg,
.jacket-customizer-wrapper #refresh-btn svg,
.jacket-customizer-wrapper #screenshot-btn svg,
.jacket-customizer-wrapper #save-btn svg,
.jacket-customizer-wrapper #fullscreen-btn svg,
.nav-right .icon-btn svg,
.nav-right .action-btn svg,
#reset-customizer svg,
#refresh-btn svg,
#screenshot-btn svg,
#save-btn svg,
#fullscreen-btn svg {
  /* SVG inherits colour via currentColor (set on the button) — no forced fill */

  /* Ensure SVG is visible */
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;

  /* Consistent sizing */
  width: 18px !important;
  height: 18px !important;

  /* Prevent flex shrinking */
  flex-shrink: 0 !important;

  /* Ensure pointer events pass through */
  pointer-events: none !important;

  /* Allow paths to render outside viewBox if needed */
  overflow: visible !important;
}

/* Stroke icons inherit colour from the button via currentColor.
   Earlier `fill: #64748b` rule removed — it would fill in outline SVGs. */
.nav-right .icon-btn svg path,
.nav-right .icon-btn svg polyline,
.nav-right .icon-btn svg line,
.nav-right .icon-btn svg circle,
.nav-right .action-btn svg path,
.nav-right .action-btn svg polyline,
.nav-right .action-btn svg line,
.nav-right .action-btn svg circle {
  stroke: currentColor !important;
  fill: none !important;
  stroke-width: 1.75px !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  vector-effect: non-scaling-stroke;
}

.jacket-customizer-wrapper .nav-right .icon-btn svg circle,
.jacket-customizer-wrapper .nav-right .action-btn svg circle,
.jacket-customizer-wrapper #screenshot-btn svg circle,
.nav-right .icon-btn svg circle,
.nav-right .action-btn svg circle,
#screenshot-btn svg circle {
  fill: #ffffff !important;
}

/* Hover states with explicit colors - MAXIMUM SPECIFICITY */
.jacket-customizer-wrapper .nav-right .icon-btn:hover,
.jacket-customizer-wrapper .nav-right .action-btn:hover,
.jacket-customizer-wrapper #reset-customizer:hover,
.jacket-customizer-wrapper #refresh-btn:hover,
.jacket-customizer-wrapper #screenshot-btn:hover,
.jacket-customizer-wrapper #save-btn:hover,
.jacket-customizer-wrapper #fullscreen-btn:hover,
.nav-right .icon-btn:hover,
.nav-right .action-btn:hover,
#reset-customizer:hover,
#refresh-btn:hover,
#screenshot-btn:hover,
#save-btn:hover,
#fullscreen-btn:hover {
  background-color: #f1f5f9 !important;
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  border: 1px solid #cbd5e1 !important;
  color: #374151 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.jacket-customizer-wrapper .nav-right .icon-btn:hover svg,
.jacket-customizer-wrapper .nav-right .action-btn:hover svg,
.jacket-customizer-wrapper #reset-customizer:hover svg,
.jacket-customizer-wrapper #refresh-btn:hover svg,
.jacket-customizer-wrapper #screenshot-btn:hover svg,
.jacket-customizer-wrapper #save-btn:hover svg,
.jacket-customizer-wrapper #fullscreen-btn:hover svg,
.nav-right .icon-btn:hover svg,
.nav-right .action-btn:hover svg,
#reset-customizer:hover svg,
#refresh-btn:hover svg,
#screenshot-btn:hover svg,
#save-btn:hover svg,
#fullscreen-btn:hover svg {
  fill: #374151 !important;
}

/* Active/pressed states - MAXIMUM SPECIFICITY */
.jacket-customizer-wrapper .nav-right .icon-btn:active,
.jacket-customizer-wrapper .nav-right .action-btn:active,
.jacket-customizer-wrapper #reset-customizer:active,
.jacket-customizer-wrapper #refresh-btn:active,
.jacket-customizer-wrapper #screenshot-btn:active,
.jacket-customizer-wrapper #save-btn:active,
.jacket-customizer-wrapper #fullscreen-btn:active,
.nav-right .icon-btn:active,
.nav-right .action-btn:active,
#reset-customizer:active,
#refresh-btn:active,
#screenshot-btn:active,
#save-btn:active,
#fullscreen-btn:active {
  background-color: #e2e8f0 !important;
  background: #e2e8f0 !important;
  transform: translateY(0) !important;
  box-shadow: none !important;
}

/* Focus states for accessibility - MAXIMUM SPECIFICITY */
.jacket-customizer-wrapper .nav-right .icon-btn:focus,
.jacket-customizer-wrapper .nav-right .action-btn:focus,
.jacket-customizer-wrapper #reset-customizer:focus,
.jacket-customizer-wrapper #refresh-btn:focus,
.jacket-customizer-wrapper #save-btn:focus,
.jacket-customizer-wrapper #fullscreen-btn:focus,
.nav-right .icon-btn:focus,
.nav-right .action-btn:focus,
#reset-customizer:focus,
#refresh-btn:focus,
#screenshot-btn:focus,
#save-btn:focus,
#fullscreen-btn:focus {
  outline: 2px solid #374151 !important;
  outline-offset: 2px !important;
}

/* Ensure nav-right container displays properly */
.jacket-customizer-wrapper .nav-right,
.nav-right {
  display: flex !important;
  flex-direction: row !important;
  gap: 0.5rem !important;
  align-items: center !important;
}

/* Firefox-specific fixes */
@-moz-document url-prefix() {

  .nav-right .icon-btn,
  .nav-right .action-btn,
  #reset-customizer,
  #refresh-btn,
  #screenshot-btn,
  #save-btn,
  #fullscreen-btn {
    -moz-appearance: none !important;
    appearance: none !important;
    background-color: #ffffff !important;
  }
}

/* Safari-specific fixes */
@supports (-webkit-touch-callout: none) {

  .nav-right .icon-btn,
  .nav-right .action-btn,
  #reset-customizer,
  #refresh-btn,
  #screenshot-btn,
  #save-btn,
  #fullscreen-btn {
    -webkit-appearance: none !important;
    appearance: none !important;
    background-color: #ffffff !important;
  }

  /* Stroke icons inherit colour from the button — no forced fill */
}

/* Safari/WebKit-specific fixes */
@supports (-webkit-appearance: none) {

  .nav-right .icon-btn,
  .nav-right .action-btn {
    -webkit-appearance: none !important;
    appearance: none !important;
  }
}

/* Windows high contrast mode support */
@media (forced-colors: active) {

  .nav-right .icon-btn,
  .nav-right .action-btn {
    forced-color-adjust: none;
    background-color: ButtonFace !important;
    border-color: ButtonBorder !important;
    color: ButtonText !important;
  }

  .nav-right .icon-btn svg,
  .nav-right .action-btn svg {
    fill: ButtonText !important;
  }
}

/* ====================================================================
   NAV ICON IMG — Data-URI image icons (immune to CSS/JS cascade)
   These replace inline SVGs so Shopify theme CSS cannot affect fill.
   Lock dimensions and visibility with maximum specificity.
   ==================================================================== */
.jacket-customizer-wrapper .nav-icon-img,
.nav-right .nav-icon-img,
.nav-icon-img {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  border: none !important;
  background: none !important;
  padding: 0 !important;
  margin: 0 !important;
  pointer-events: none !important;
  -webkit-user-drag: none !important;
  user-select: none !important;
}

/* fullscreen-exit starts hidden; JS toggles both */
.jacket-customizer-wrapper #fullscreen-btn .fullscreen-exit,
#fullscreen-btn .fullscreen-exit {
  display: none !important;
}

.jacket-customizer-wrapper.fullscreen-mode #fullscreen-btn .fullscreen-enter,
.fullscreen-mode #fullscreen-btn .fullscreen-enter {
  display: none !important;
}

.jacket-customizer-wrapper.fullscreen-mode #fullscreen-btn .fullscreen-exit,
.fullscreen-mode #fullscreen-btn .fullscreen-exit {
  display: block !important;
}

/* ====================================================================
   PRODUCTION: HIDE ALL DEBUG ELEMENTS
   Ensures debug buttons/panels remain hidden in production
   ==================================================================== */

#badge-size-debug-toggle,
#debug-button-toggle,
#debug-stud-toggle,
#badge-size-debug-panel,
#debug-button-panel,
#debug-stud-panel,
#camera-debug-tool,
#debug-toggle-btn {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ====================================================================
   CONTINUE DESIGN MODAL - On Page Load
   Shows when user has saved designs from a previous session
   ==================================================================== */

/* ─────────────────────────────────────────────────────────────────
   CONTINUE YOUR DESIGN — restyled to match the brand modal language
   established by sv-review-overlay + sv-size-chart. Same backdrop
   veil, same border-radius, same Jost typography, same button hierarchy.
   ───────────────────────────────────────────────────────────────── */
.continue-design-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 14, 15, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  animation: fadeIn 0.32s ease;
  padding: 20px;
  font-family: 'Jost', sans-serif;
}

.continue-design-overlay.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.continue-design-modal {
  background: #ffffff;
  border-radius: 6px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: slideUp 0.42s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.continue-design-modal .modal-header {
  text-align: center;
  padding: 44px 32px 26px;
  background: #ffffff;
  border-bottom: 1px solid rgba(14, 14, 15, 0.08);
}

/* 2026-05-15: removed .modal-icon-wrap — Sam wants no decorative icons.
   Eyebrow tag replaces the icon visually as a brand-aligned anchor. */
.continue-design-modal .modal-eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(14, 14, 15, 0.5);
  margin: 0 0 14px;
  font-family: 'Jost', sans-serif;
}

.continue-design-modal .modal-header h3 {
  font-size: 26px;
  font-weight: 400;
  color: #0e0e0f;
  margin: 0 0 8px;
  font-family: 'Jost', sans-serif;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.continue-design-modal .modal-subtitle {
  font-size: 13px;
  color: rgba(14, 14, 15, 0.55);
  margin: 0;
  font-family: 'Jost', sans-serif;
  font-weight: 300;
}

.continue-design-modal .modal-content {
  padding: 22px 32px;
  max-height: 320px;
  overflow-y: auto;
  font-family: 'Jost', sans-serif;
}

.continue-design-modal .saved-designs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.continue-design-modal .saved-design-item {
  background: #ffffff;
  border: 1px solid rgba(14, 14, 15, 0.08);
  border-radius: 4px;
  padding: 14px 16px;
  transition: all 0.2s ease;
  /* 2026-05-15: now a button — make it look + feel clickable */
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.continue-design-modal .saved-design-item:hover {
  border-color: rgba(14, 14, 15, 0.28);
  background: rgba(14, 14, 15, 0.02);
}

.continue-design-modal .saved-design-item.is-selected {
  background: rgba(41, 138, 48, 0.06);
  border-color: #298a30;
  box-shadow: 0 0 0 1px #298a30 inset;
}

.continue-design-modal .saved-design-item.current {
  background: rgba(41, 138, 48, 0.04);
  border-color: rgba(41, 138, 48, 0.5);
}

.continue-design-modal .design-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.continue-design-modal .design-item-name {
  font-size: 14px;
  font-weight: 500;
  color: #0e0e0f;
  flex: 1;
  font-family: 'Jost', sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.continue-design-modal .current-badge {
  background: #298a30;
  color: white;
  font-size: 9px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-family: 'Jost', sans-serif;
}

.continue-design-modal .design-item-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.continue-design-modal .design-item-details span {
  font-size: 11px;
  color: rgba(14, 14, 15, 0.75);
  background: rgba(14, 14, 15, 0.04);
  padding: 5px 10px;
  border-radius: 2px;
  border: 0;
  font-family: 'Jost', sans-serif;
  letter-spacing: 0.02em;
}
.continue-design-modal .design-item-details em {
  font-style: normal;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(14, 14, 15, 0.45);
  margin-right: 6px;
}

.continue-design-modal .modal-actions {
  display: flex;
  gap: 10px;
  padding: 18px 32px 32px;
  background: #ffffff;
  border-top: 1px solid rgba(14, 14, 15, 0.08);
}

.continue-design-modal .btn-secondary,
.continue-design-modal .btn-primary {
  flex: 1;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 0;
  font-family: 'Jost', sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.continue-design-modal .btn-secondary {
  background: transparent !important;
  color: rgba(14, 14, 15, 0.65) !important;
}
.continue-design-modal .btn-secondary:hover {
  color: #0e0e0f !important;
  background: transparent !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.continue-design-modal .btn-primary {
  flex: 1.4;
  background: #0e0e0f !important;
  color: #ffffff !important;
}
.continue-design-modal .btn-primary:hover {
  background: #298a30 !important;
  box-shadow: 0 6px 18px rgba(41, 138, 48, 0.3);
}

/* Stud colour dot styling */
.stud-color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  margin: 4px;
  background-clip: padding-box;
}

/* PREMIUM: Refined selection halo instead of messy pill labels */
.stud-color-dot.active {
  transform: scale(1.25);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #111827, 0 8px 15px rgba(0, 0, 0, 0.1);
  outline: none;
  z-index: 2;
}

.stud-color-dot:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(17, 24, 39, 0.2);
}

/* HIGH-END: Toast Notification System */
/* Luxury toast — top-of-page transient confirmation. Same brand
   language as .sv-toast (bottom-of-page) but at top for non-modal
   feedback. Square 4px corners, brand-dark, Jost. */
.luxury-toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #0e0e0f;
  color: #fff;
  padding: 12px 22px;
  border-radius: 4px;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.32s cubic-bezier(0.2, 0, 0, 1);
}

.luxury-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.luxury-toast-icon {
  width: 18px;
  height: 18px;
  background: #298a30;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

/* Shared titles for colour options (Tooltip-style) */
/* Tooltips removed per user request */

/* Stale .continue-design-modal btn rules removed — the on-brand styling
   is defined further up with the rest of the modal and uses !important
   so it already wins, but keeping these duplicates around added weight. */

/* Notification Toast — fires after Continue Your Design / Start Fresh.
   Bottom-centre, brand-dark, Jost, 4px corners. Success/error variants
   tint the background subtly rather than swap to harsh red/green. */
.continue-design-notification {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0e0e0f;
  color: #fff;
  padding: 12px 22px;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  z-index: 100001;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.32s cubic-bezier(0.2, 0, 0, 1);
}

.continue-design-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.continue-design-notification.success {
  background: #298a30; /* brand-green */
}

.continue-design-notification.error {
  background: #c41e3a; /* deeper crimson, less harsh than #dc2626 */
}

.continue-design-notification .notification-content {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}

.continue-design-notification .notification-icon {
  font-size: 18px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .continue-design-modal {
    margin: 10px;
    max-width: calc(100% - 20px);
  }

  .continue-design-modal .modal-header {
    padding: 24px 16px 20px;
  }

  .continue-design-modal .modal-header h3 {
    font-size: 18px;
  }

  .continue-design-modal .modal-content {
    padding: 16px;
  }

  .continue-design-modal .modal-actions {
    flex-direction: column;
    padding: 16px;
  }

  .continue-design-notification {
    left: 16px;
    right: 16px;
    transform: translateX(0) translateY(100px);
  }

  .continue-design-notification.show {
    transform: translateX(0) translateY(0);
  }
}

/* ====================================================================
   ACTION FEEDBACK SYSTEM - Screenshot & Save Notifications
   ==================================================================== */

/* Action Success Notification Toast - Centered on 3D Viewer */
.action-notification {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 20px 32px;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.5);
  z-index: 10001;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 18px;
  font-weight: 600;
  pointer-events: none;
}

.action-notification.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.action-notification .notification-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-notification .notification-icon {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-notification .notification-message {
  font-weight: 500;
}

/* Button Loading State */
.btn-loading {
  opacity: 0.7;
  cursor: wait !important;
  pointer-events: none;
}

.spinner-icon {
  animation: spin 1s linear infinite;
}

.spinner-icon circle {
  stroke-dasharray: 80;
  stroke-dashoffset: 60;
  animation: spinCircle 1.5s ease-in-out infinite;
}

@keyframes spinCircle {
  0% {
    stroke-dashoffset: 60;
  }

  50% {
    stroke-dashoffset: 0;
  }

  100% {
    stroke-dashoffset: -60;
  }
}

/* Mobile Responsive Notifications */
@media (max-width: 768px) {
  .action-notification {
    padding: 16px 24px;
    font-size: 16px;
  }
}

/* ============================================================================
   BADGE CSV IMPORT ADMIN PANEL STYLES
   ============================================================================ */

#badge-csv-admin-panel {
  font-family: 'Jost', sans-serif;
}

#badge-csv-admin-panel h3 {
  font-weight: 700;
}

#badge-csv-admin-panel button {
  transition: all 0.2s ease;
}

#badge-csv-admin-panel button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#badge-csv-admin-panel button:active {
  transform: translateY(0);
}

#badge-csv-admin-panel code {
  font-family: 'Courier New', Consolas, monospace;
  font-size: 12px;
}

#badge-csv-admin-panel input[type="file"] {
  transition: all 0.2s ease;
}

#badge-csv-admin-panel input[type="file"]:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

/* CSV Preview Scrollbar */
#csv-preview-content::-webkit-scrollbar {
  width: 8px;
}

#csv-preview-content::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 4px;
}

#csv-preview-content::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

#csv-preview-content::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Badge CSV Admin Toggle Button Hover */
#badge-csv-admin-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.5);
}

/* Mobile Responsive CSV Admin Panel */
@media (max-width: 768px) {
  #badge-csv-admin-panel {
    width: 95%;
    max-height: 95vh;
  }

  #badge-csv-admin-panel>div:first-child {
    padding: 16px;
  }

  #badge-csv-admin-panel>div:first-child h2 {
    font-size: 20px;
  }

  #badge-csv-admin-panel>div:first-child p {
    font-size: 12px;
  }

  #badge-csv-admin-panel>div:last-child {
    padding: 16px;
  }
}

/* ====================================================================
   PER-PLACEMENT STUD COLOUR DOTS
   Mini colour circles inside each stud-option row.
   Injected by JS — injectPerPlacementColorDots()
   ==================================================================== */
.stud-color-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  margin-right: 8px;
  flex-shrink: 0;
}

.stud-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
  opacity: 0.55;
}

.stud-color-dot:hover {
  opacity: 1;
  transform: scale(1.25);
  border-color: rgba(0, 0, 0, 0.2);
}

.stud-color-dot.active {
  opacity: 1;
  border-color: #374151;
  box-shadow: 0 0 0 2px rgba(55, 65, 81, 0.25);
  transform: scale(1.15);
}

/* Dim dots when the stud toggle is off — detected via :has(input:checked), no JS class needed */
.stud-option:not(:has(input:checked)) .stud-color-dots {
  opacity: 0.3;
  pointer-events: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .stud-color-dot {
    width: 12px;
    height: 12px;
  }

  .stud-color-dots {
    gap: 3px;
    margin-right: 6px;
  }
}

/* ============================================================
   MODEL TRANSITION UX — price muting
   Applied to <body> while _inModelTransition is true so prices
   are visually greyed out until studs/badges are fully restored.
   ============================================================ */
body.sv-price-muted #base-price,
body.sv-price-muted #custom-price,
body.sv-price-muted #total-price,
body.sv-price-muted #button-price {
  opacity: 0.35;
  transition: opacity 0.3s ease;
}

/* ============================================================
   S&V UI IMPROVEMENTS — Batch 1
   Pure CSS only — safe to deploy without JS or Liquid changes.
   All rules appended here to avoid touching the minified block.
   Date: 2026-02-28
   ============================================================ */

/* ── 1. Mobile sheet handle → slim grey pill ───────────────── */
@media (max-width: 768px) {
  .sheet-handle {
    width: 48px !important;
    height: 5px !important;
    background: #d1d5db !important;
    border-radius: 3px !important;
    margin: 0 auto 14px auto !important;
    display: block !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
  }
}

/* ── 2. Reduce collapsed peek height 80px → 56px ──────────── */
@media (max-width: 768px) {
  .nike-bottom-sheet {
    transform: translateY(calc(100% - 56px)) !important;
  }

  .nike-bottom-sheet.expanded {
    transform: translateY(0) !important;
  }
}

/* ── 5. iOS Safari momentum scroll ────────────────────────── */
@media (max-width: 768px) {
  .nike-bottom-sheet {
    -webkit-overflow-scrolling: touch !important;
  }
}

/* ── 4. Circular denim & stud colour swatches on mobile ───── */
@media (max-width: 768px) {
  .option-grid .option-item>div:first-child {
    width: 52px !important;
    height: 52px !important;
    border-radius: 50% !important;
    margin: 0 auto 8px auto !important;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.1) !important;
  }

  .option-grid .option-item.selected>div:first-child {
    box-shadow:
      0 0 0 3px #1a1a1a,
      0 0 0 6px white,
      inset 0 0 0 2px rgba(0, 0, 0, 0.1) !important;
  }
}

/* ── 9. Mobile ATC button — luxury shimmer ─────────────────── */
@media (max-width: 768px) {
  #mobile-add-to-cart-btn {
    position: relative !important;
    overflow: hidden !important;
    background: -webkit-linear-gradient(315deg, #1a1a1a 0%, #374151 100%) !important;
    background: linear-gradient(135deg, #1a1a1a 0%, #374151 100%) !important;
    letter-spacing: 0.5px !important;
  }

  /* Shimmer layer sits as a child span injected by JS; fall back to ::after
     in case JS hasn't run yet — both are safe. */
  #mobile-add-to-cart-btn::after {
    content: '' !important;
    position: absolute !important;
    top: -50% !important;
    left: -60% !important;
    width: 30% !important;
    height: 200% !important;
    background: rgba(255, 255, 255, 0.12) !important;
    -webkit-transform: skewX(-20deg) !important;
    -ms-transform: skewX(-20deg) !important;
    transform: skewX(-20deg) !important;
    -webkit-animation: svCartShimmer 4s infinite !important;
    animation: svCartShimmer 4s infinite !important;
    pointer-events: none !important;
  }
}

/* @keyframes MUST live outside @media for Firefox compatibility */
@-webkit-keyframes svCartShimmer {
  0% {
    left: -60%;
  }

  100% {
    left: 160%;
  }
}

@keyframes svCartShimmer {
  0% {
    left: -60%;
  }

  100% {
    left: 160%;
  }
}

/* ── 11. 3D viewer — subtle radial gradient background ─────── */
@media (max-width: 768px) {

  .viewer-section,
  #3d-preview-container {
    background: radial-gradient(ellipse at 50% 30%,
        #eef1f5 0%,
        #e0e5eb 100%) !important;
  }
}

/* ── 19. iOS Safari stud toggle transition fix ─────────────── */
@supports (-webkit-touch-callout: none) {
  .stud-toggle-switch {
    -webkit-transition: background-color 0.3s ease !important;
    transition: background-color 0.3s ease !important;
  }

  .stud-toggle-switch::after {
    -webkit-transition: -webkit-transform 0.3s ease !important;
    transition: transform 0.3s ease !important;
  }
}

/* ── 12. Section numbers render as STEP 0X eyebrow (see line ~418) ── */
.section-number {
  background: transparent !important;
  border: 0 !important;
  color: rgba(14, 14, 15, 0.4) !important;
  font-weight: 600 !important;
  transition: color 0.2s ease !important;
}

.config-section.expanded .section-number {
  background: transparent !important;
  color: #0e0e0f !important;
  border-color: transparent !important;
}

/* ── 15. Desktop: larger badge thumbnails on wide screens ──── */
@media (min-width: 1440px) {
  .sv-badge-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    max-height: 600px !important;
  }

  .sv-badge-thumbnail {
    min-height: 190px !important;
  }

  .sv-badge-image {
    height: 100px !important;
  }
}

/* ── 17. Loading spinner — backdrop blur + larger logo ─────── */
.loading-spinner {
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  background: rgba(0, 0, 0, 0.95) !important;
}

.loading-logo {
  width: 72px !important;
  height: 72px !important;
  opacity: 0.9 !important;
}

/* ── 16. Desktop: CSS tooltip on colour swatches ───────────── */
.color-option {
  position: relative !important;
}

.color-option::after {
  display: none !important;
}

/* ── 20. Desktop: section number hover micro-animation ─────── */
.section-header .section-number {
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease !important;
}

.section-header:hover .section-number {
  transform: scale(1.12) !important;
}

/* ── Badge placement hint overlay (mobile) ─────────────────── */
.badge-placement-hint {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.82);
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  pointer-events: none;
  z-index: 9998;
  display: none;
  white-space: nowrap;
}

.badge-placement-hint.visible {
  display: block;
  animation: svHintPulse 2s ease-in-out infinite;
}

@keyframes svHintPulse {

  0%,
  100% {
    opacity: 0.78;
    transform: translateX(-50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.03);
  }
}

/* ============================================================
   END S&V UI Improvements — Batch 1
   ============================================================ */

/* ============================================================
   S&V UI IMPROVEMENTS — Batch 2
   Styles supporting Liquid (jacket.liquid) changes.
   Date: 2026-02-28
   ============================================================ */

/* ── 13. Top navigation bar — sticky below Shopify's fixed header ─── */
/* 2026-05-10: Sticky so the view buttons (Front/Back/Left/Right/Collar)
   and action icons (Reset/Refresh/Screenshot/Save/BG-toggle/Fullscreen)
   stay accessible while the user scrolls. Shopify header is position:
   fixed and 80px tall, so we offset by 80px to dock just beneath it. */
.customizer-top-nav {
  position: sticky !important;
  top: 80px !important;
  z-index: 50 !important;
  background: var(--color-white) !important;
}

.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 1;
}

.nav-logo-link {
  display: inline-block;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.nav-logo-link:hover {
  opacity: 0.7;
}

.nav-logo {
  height: 26px;
  width: auto;
  opacity: 0.82;
  display: block;
}

/* Hide centred logo on mobile (top nav is hidden there anyway) */
@media (max-width: 768px) {
  .nav-center {
    display: none !important;
  }
}

/* ============================================================
   END S&V UI Improvements — Batch 2
   ============================================================ */

/* ============================================================
   S&V UI IMPROVEMENTS — Batch 3
   Cross-browser compatibility + Tablet breakpoints
   Browsers covered: Chrome, Firefox, Safari, Edge, Samsung Internet
   Tablets covered:  iPad (portrait + landscape), Android tablets,
                     Surface Pro, iPad Pro
   Date: 2026-02-28
   ============================================================ */

/* ── Hoist remaining keyframes outside any @media ─────────── */
/* (Firefox ≤115 and some Android browsers reject nested @keyframes) */
@-webkit-keyframes svHintPulse {

  0%,
  100% {
    opacity: 0.78;
    -webkit-transform: translateX(-50%) scale(1);
    transform: translateX(-50%) scale(1);
  }

  50% {
    opacity: 1;
    -webkit-transform: translateX(-50%) scale(1.03);
    transform: translateX(-50%) scale(1.03);
  }
}

@keyframes svHintPulse {

  0%,
  100% {
    opacity: 0.78;
    -webkit-transform: translateX(-50%) scale(1);
    transform: translateX(-50%) scale(1);
  }

  50% {
    opacity: 1;
    -webkit-transform: translateX(-50%) scale(1.03);
    transform: translateX(-50%) scale(1.03);
  }
}

/* ── Firefox: backdrop-filter fallback ─────────────────────── */
/* backdrop-filter is not supported in Firefox without about:config flag.
   We provide a solid fallback so the spinner still looks good. */
@supports not (backdrop-filter: blur(1px)) {
  .loading-spinner {
    background: #000000 !important;
  }
}

/* ── Cross-browser: gradient prefixes on section numbers ───── */
.config-section.expanded .section-number {
  background: -webkit-linear-gradient(315deg, #374151 0%, #111827 100%) !important;
  background: linear-gradient(135deg, #374151 0%, #111827 100%) !important;
}

/* ── Cross-browser: all transition shorthand prefixed ─────── */
.section-number {
  -webkit-transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease !important;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease !important;
}

.section-header .section-number {
  -webkit-transition: -webkit-transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease !important;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease !important;
}

.color-option::after {
  -webkit-transition: opacity 0.15s ease !important;
  transition: opacity 0.15s ease !important;
}

/* ── Cross-browser: touch-action for bottom sheet drag ─────── */
@media (max-width: 1024px) {
  .nike-bottom-sheet {
    /* Allow vertical swipe to be intercepted by our JS drag handler
       while still allowing horizontal scroll inside the sheet content */
    touch-action: pan-x !important;
    -ms-touch-action: pan-x !important;
  }

  /* Sheet content scroll area re-enables vertical pan */
  .step-content {
    touch-action: pan-y !important;
    -ms-touch-action: pan-y !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   TABLET — PORTRAIT  (769px – 1024px)
   Covers: iPad Mini, iPad Air, iPad 10th gen (portrait),
           Samsung Tab, Surface Go
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1024px) {

  /* Show mobile bottom sheet layout on tablets in portrait */
  .nike-bottom-sheet {
    display: block !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #ffffff !important;
    border-radius: 20px 20px 0 0 !important;
    -webkit-box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.10) !important;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.10) !important;
    z-index: 9999 !important;
    /* Tablet gets slightly more of the sheet visible — 72px matches a Figma tablet spec */
    -webkit-transform: translateY(calc(100% - 72px)) !important;
    -ms-transform: translateY(calc(100% - 72px)) !important;
    transform: translateY(calc(100% - 72px)) !important;
    -webkit-transition: -webkit-transform 0.3s ease !important;
    transition: transform 0.3s ease !important;
    max-height: 65vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 20px 28px !important;
    box-sizing: border-box !important;
    /* Wider padding takes advantage of tablet width */
  }

  .nike-bottom-sheet.expanded {
    -webkit-transform: translateY(0) !important;
    -ms-transform: translateY(0) !important;
    transform: translateY(0) !important;
  }

  /* Tablet: pill handle slightly wider */
  .sheet-handle {
    width: 56px !important;
    height: 5px !important;
    background: #d1d5db !important;
    border-radius: 3px !important;
    margin: 0 auto 16px auto !important;
    display: block !important;
    border: none !important;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
  }

  /* Tablet: Viewer gets more room - the sheet is taller */
  .viewer-section,
  #3d-preview-container {
    background: -webkit-radial-gradient(50% 30% ellipse, #eef1f5 0%, #e0e5eb 100%) !important;
    background: radial-gradient(ellipse at 50% 30%, #eef1f5 0%, #e0e5eb 100%) !important;
    height: calc(100vh - 72px) !important;
  }

  /* Tablet: colour swatches — slightly larger circles */
  .option-grid .option-item>div:first-child {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    margin: 0 auto 8px auto !important;
    -webkit-box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.1) !important;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.1) !important;
  }

  .option-grid .option-item.selected>div:first-child {
    -webkit-box-shadow: 0 0 0 3px #1a1a1a, 0 0 0 6px white, inset 0 0 0 2px rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 0 0 3px #1a1a1a, 0 0 0 6px white, inset 0 0 0 2px rgba(0, 0, 0, 0.1) !important;
  }

  /* Tablet: hide desktop config panel */
  .config-panel,
  #desktop-config-panel {
    display: none !important;
  }

  /* Tablet: ATC button shimmer */
  #mobile-add-to-cart-btn {
    position: relative !important;
    overflow: hidden !important;
    background: -webkit-linear-gradient(315deg, #1a1a1a 0%, #374151 100%) !important;
    background: linear-gradient(135deg, #1a1a1a 0%, #374151 100%) !important;
    padding: 16px 32px !important;
    /* Larger tap target on tablet */
    border-radius: 30px !important;
    font-size: 17px !important;
  }

  #mobile-add-to-cart-btn::after {
    content: '' !important;
    position: absolute !important;
    top: -50% !important;
    left: -60% !important;
    width: 30% !important;
    height: 200% !important;
    background: rgba(255, 255, 255, 0.12) !important;
    -webkit-transform: skewX(-20deg) !important;
    -ms-transform: skewX(-20deg) !important;
    transform: skewX(-20deg) !important;
    -webkit-animation: svCartShimmer 4s infinite !important;
    animation: svCartShimmer 4s infinite !important;
    pointer-events: none !important;
  }

  /* Tablet: badge placement hint — reposition for larger screen */
  .badge-placement-hint {
    bottom: 96px !important;
    font-size: 15px !important;
    padding: 12px 28px !important;
  }

  /* Tablet: option grid — can fit more columns */
  .option-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px !important;
  }

  /* Tablet: stud carousel nav dots — slightly larger tap target */
  .stud-dot {
    width: 10px !important;
    height: 10px !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   TABLET — LANDSCAPE  (769px – 1180px, orientation: landscape)
   Covers: iPad Air landscape, iPad Pro 11" landscape,
           Samsung Tab S landscape
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1180px) and (orientation: landscape) {

  /* In landscape, tablets have enough width to show the side panel */
  /* So we switch to a desktop-style split layout */
  .nike-bottom-sheet {
    display: none !important;
  }

  /* Restore desktop config panel */
  .config-panel,
  #desktop-config-panel {
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
    -webkit-box-orient: vertical !important;
    -webkit-box-direction: normal !important;
    -ms-flex-direction: column !important;
    flex-direction: column !important;
    width: 340px !important;
    /* Slightly narrower than desktop 380px but workable */
    min-width: 280px !important;
  }

  /* Landscape tablet: viewer takes remaining space */
  .viewer-section,
  #3d-preview-container {
    height: 100vh !important;
    background: -webkit-radial-gradient(50% 30% ellipse, #eef1f5 0%, #e0e5eb 100%) !important;
    background: radial-gradient(ellipse at 50% 30%, #eef1f5 0%, #e0e5eb 100%) !important;
  }

  /* Landscape tablet: section numbers use desktop outlined style */
  .section-number {
    background: transparent !important;
    border: 2px solid #374151 !important;
    color: #374151 !important;
  }

  .config-section.expanded .section-number {
    background: -webkit-linear-gradient(315deg, #374151 0%, #111827 100%) !important;
    background: linear-gradient(135deg, #374151 0%, #111827 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   BROWSER-SPECIFIC FIXES
   ═══════════════════════════════════════════════════════════ */

/* ── Firefox: explicit gradient syntax ─────────────────────── */
@-moz-document url-prefix() {
  .config-section.expanded .section-number {
    background: linear-gradient(135deg, #374151 0%, #111827 100%) !important;
  }

  #mobile-add-to-cart-btn {
    background: linear-gradient(135deg, #1a1a1a 0%, #374151 100%) !important;
  }

  /* Firefox: loading spinner — backdrop-filter not supported without flag */
  .loading-spinner {
    background: #000000 !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

/* ── Samsung Internet browser fix ──────────────────────────── */
/* Samsung Internet uses a slightly different box-shadow rendering */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm) {
  .nike-bottom-sheet {
    -webkit-box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12) !important;
  }
}

/* ── Edge (Chromium) and IE11 fallbacks ────────────────────── */
/* IE11 does not support CSS Grid auto-fill — badge gallery fallback */
.sv-badge-gallery-grid {
  display: -ms-grid !important;
  /* IE11 fallback */
  display: grid !important;
  /* All modern browsers */
}

/* IE11: remove the -ms-grid display if on all modern targets it's fine */
@supports (display: grid) {
  .sv-badge-gallery-grid {
    display: grid !important;
  }
}

/* ── High-DPI / Retina display fixes ─────────────────────────
   Ensure the pill handle looks sharp on 2x/3x screens          */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
  .sheet-handle {
    /* Already hardware-accelerated via border-radius,
       but force composite layer for smooth drag on retina */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
  }
}

/* ── Reduced motion: respect user accessibility preference ───
   Users who set "Prefer Reduced Motion" in OS settings should not
   see the shimmer, hint pulse, or section hover animations.       */
@media (prefers-reduced-motion: reduce) {
  #mobile-add-to-cart-btn::after {
    -webkit-animation: none !important;
    animation: none !important;
    left: 200% !important;
    /* Move shimmer off-screen permanently */
  }

  .badge-placement-hint.visible {
    -webkit-animation: none !important;
    animation: none !important;
    opacity: 0.9 !important;
  }

  .section-header:hover .section-number {
    -webkit-transform: scale(1) !important;
    -ms-transform: scale(1) !important;
    transform: scale(1) !important;
  }

  .stud-carousel {
    -webkit-transition: none !important;
    transition: none !important;
  }

  .nike-bottom-sheet {
    -webkit-transition: none !important;
    transition: none !important;
  }
}

/* ── Focus-visible: keyboard nav accessibility ──────────────
   Ensures focus rings are visible for keyboard/switch users.    */
.sheet-handle:focus-visible,
.nav-arrow:focus-visible,
.option-item:focus-visible,
#mobile-add-to-cart-btn:focus-visible {
  outline: 3px solid #3b82f6 !important;
  outline-offset: 2px !important;
}

/* Fallback for browsers that don't support :focus-visible */
.sheet-handle:focus,
.nav-arrow:focus,
.option-item:focus,
#mobile-add-to-cart-btn:focus {
  outline: 3px solid rgba(59, 130, 246, 0.6) !important;
}

/* ── Desktop stud carousel (horizontal scroll-snap) ─────────────────
   On desktop the same .stud-carousel-wrapper DOM node is moved into
   #desktop-stud-container by repositionStudControls(). These rules apply
   the horizontal paging layout for screens wider than 768 px.
   Mobile layout is handled separately inside @media (max-width: 768px).
   ──────────────────────────────────────────────────────────────────── */
@media (min-width: 769px) {
  #desktop-stud-container {
    overflow: hidden;
    position: relative;
  }

  #desktop-stud-container .stud-carousel-container {
    margin: 16px 0 0;
  }

  #desktop-stud-container .stud-nav-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
  }

  #desktop-stud-container .stud-nav-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
  }

  #desktop-stud-container .stud-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  #desktop-stud-container .stud-dot.active {
    background: #111827;
    transform: scale(1.25);
  }

  #desktop-stud-container .stud-nav-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: white;
    color: #111827;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
  }

  #desktop-stud-container .stud-nav-arrow:not(:disabled):hover {
    background: #111827;
    color: white;
    border-color: #111827;
  }

  #desktop-stud-container .stud-nav-arrow:disabled {
    opacity: 0.35;
    cursor: default;
  }

  #desktop-stud-container .stud-carousel-wrapper {
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: relative;
  }

  #desktop-stud-container .stud-carousel-wrapper::-webkit-scrollbar {
    display: none;
  }

  #desktop-stud-container .stud-carousel {
    display: flex;
    width: 800%; /* 8 sections × 100% */
  }

  #desktop-stud-container .stud-section-mobile {
    width: 12.5%; /* 100% / 8 sections */
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 0 8px;
    box-sizing: border-box;
  }

  /* Hint text — sits directly below section title, above the carousel */
  #desktop-stud-container .stud-scroll-hint {
    margin: 0 0 12px;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.05em;
    color: #b0b7c3;
    opacity: 0.85;
    user-select: none;
    pointer-events: none;
  }

  /* Premium contextual zone-name display — replaces the old swipe hint */
  #desktop-stud-container .stud-zone-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin: 4px 0 14px;
    font-family: 'Jost', sans-serif;
    user-select: none;
    transition: opacity 0.2s ease;
  }
  #desktop-stud-container .stud-zone-eyebrow {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(14, 14, 15, 0.45);
  }
  #desktop-stud-container .stud-zone-name {
    font-size: 14px;
    font-weight: 600;
    color: #0e0e0f;
    letter-spacing: 0.01em;
  }
  #desktop-stud-container .stud-zone-counter {
    font-size: 11px;
    font-weight: 500;
    color: rgba(14, 14, 15, 0.4);
    letter-spacing: 0.04em;
    font-feature-settings: "tnum"; /* tabular numerals — counter doesn't shift width */
  }

  /* Hide the per-section h3 on desktop — the new contextual ZONE display
     above the nav row now serves as the zone label. h3 stays on mobile. */
  #desktop-stud-container .stud-section-mobile h3 {
    display: none;
  }

  /* One-time nudge: carousel strip shifts left → snaps back */
  @keyframes stud-nudge-hint {
    0%   { transform: translateX(0); }
    25%  { transform: translateX(-44px); }
    55%  { transform: translateX(-44px); }
    100% { transform: translateX(0); }
  }

  #desktop-stud-container .stud-carousel.nudge-animate {
    animation: stud-nudge-hint 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  }

  /* Right-edge gradient fade — primary "peek" signal */
  #desktop-stud-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 100%;
    background: linear-gradient(to right, transparent, #fff 90%);
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.35s ease;
  }

  /* Hide gradient when the user reaches the last section */
  #desktop-stud-container.at-last-section::after {
    opacity: 0;
  }
}

/* ── Print styles: hide customiser chrome ──────────────────── */
@media print {

  .nike-bottom-sheet,
  .customizer-top-nav,
  .config-panel {
    display: none !important;
  }

  .viewer-section {
    width: 100% !important;
    height: 100vh !important;
  }
}

/* ============================================================
   END S&V UI Improvements — Batch 3 (Cross-browser + Tablet)
   ============================================================ */

/* ============================================================
   S&V UI IMPROVEMENTS — Batch 4
   Mobile progress bar (wired to updateSimpleStep() in jacket.js)
   ============================================================ */

/* ── Progress bar track ────────────────────────────────────── */
.mobile-progress-track {
  width: 100%;
  height: 3px;
  background: #e5e7eb;
  border-radius: 2px;
  margin: 0 0 16px 0;
  overflow: hidden;
  /* Hardware-accelerate the container */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* ── Progress bar fill ─────────────────────────────────────── */
.mobile-progress-fill {
  height: 100%;
  background: #1a1a1a;
  border-radius: 2px;
  /* Smooth transition as width changes each step */
  -webkit-transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: width;
}

/* Tablet: slightly taller track */
@media (min-width: 769px) and (max-width: 1024px) {
  .mobile-progress-track {
    height: 4px;
    margin: 0 0 18px 0;
  }
}

/* Respect reduced motion — instant transition, no animation */
@media (prefers-reduced-motion: reduce) {
  .mobile-progress-fill {
    -webkit-transition: none !important;
    transition: none !important;
  }
}

/* ============================================================
   END S&V UI Improvements — Batch 4
   ============================================================ */

/* ============================================================
   S&V UI IMPROVEMENTS — Batch 5
   Mobile: live price summary, Reset button, ATC action row,
           badge placement toast, desktop cursor in placement mode
   ============================================================ */

/* ── Mobile price summary (step 7) ────────────────────────── */
.mobile-price-summary {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin: 0 0 16px 0;
}

.mobile-price-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 6px 0;
  font-size: 14px;
  color: #374151;
}

.mobile-price-label {
  color: #6b7280;
}

.mobile-price-value {
  font-weight: 600;
  color: #111827;
}

.mobile-price-total {
  border-top: 1px solid #e5e7eb;
  margin-top: 8px;
  padding-top: 12px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #111827 !important;
}

/* ── Mobile action row: Reset + ATC ───────────────────────── */
.mobile-action-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 10px;
  margin: 0 0 12px 0;
}

/* Reset button — compact, secondary style */
.mobile-reset-btn {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: 52px;
  background: #ffffff;
  color: #374151;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  -webkit-transition: border-color 0.2s ease, color 0.2s ease;
  transition: border-color 0.2s ease, color 0.2s ease;
  -webkit-flex-shrink: 0;
  -ms-flex-negative: 0;
  flex-shrink: 0;
}

.mobile-reset-btn:hover {
  border-color: #9ca3af;
  color: #111827;
}

.mobile-reset-btn:active {
  border-color: #1a1a1a;
  background: #f3f4f6;
}

/* ATC button — takes remaining width */
.mobile-atc-btn {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  height: 52px;
  background: #1a1a1a;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.2px;
  -webkit-transition: background 0.2s ease, -webkit-transform 0.15s ease;
  transition: background 0.2s ease, transform 0.15s ease;
}

.mobile-atc-btn:hover {
  background: #298a30;
}

.mobile-atc-btn:active {
  -webkit-transform: scale(0.98);
  transform: scale(0.98);
}

/* ── Badge placement toast ─────────────────────────────────── */
/* Floats above the bottom sheet, slides in from below,
   dismisses automatically after 3 seconds.                   */
#sv-badge-place-toast {
  position: fixed;
  bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 8px);
  left: 50%;
  -webkit-transform: translate(-50%, 20px);
  transform: translate(-50%, 20px);
  background: rgba(26, 26, 26, 0.92);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  -webkit-transition: opacity 0.25s ease, -webkit-transform 0.25s ease;
  transition: opacity 0.25s ease, transform 0.25s ease;
  /* Backdrop blur for glass feel on modern mobile browsers */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

#sv-badge-place-toast.visible {
  opacity: 1;
  -webkit-transform: translate(-50%, 0);
  transform: translate(-50%, 0);
}

/* Desktop: hide toast (it only makes sense on touch screens) */
@media (min-width: 1025px) {
  #sv-badge-place-toast {
    display: none !important;
  }

  /* "Done placing" is a mobile-only affordance — hide on desktop */
  #floating-done-placing-btn {
    display: none !important;
  }
}

/* ── Desktop: crosshair cursor in badge placement mode ─────── */
/* jacket.js adds 'placement-mode' class to body when active  */
body.placement-mode .jacket-canvas-container,
body.placement-mode canvas {
  cursor: crosshair !important;
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  .mobile-reset-btn,
  .mobile-atc-btn,
  #sv-badge-place-toast {
    -webkit-transition: none !important;
    transition: none !important;
  }

  #sv-badge-place-toast.visible {
    -webkit-transform: translate(-50%, 0);
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* ============================================================
   END S&V UI Improvements — Batch 5
   ============================================================ */

/* ============================================================
   S&V UI IMPROVEMENTS — Batch 6
   Mobile: sheet peek height, intuitive handle, swipe hint,
           desktop rec banner, S&V viewer watermark
   ============================================================ */

/* ── Collapsed sheet peek: taller to cover Shopify nav ─────── */
/* Old value was calc(100% - 80px) — now 120px, enough to cover
   the theme's bottom navigation bar fully.                     */
@media (max-width: 768px) {
  .nike-bottom-sheet {
    -webkit-transform: translateY(calc(100% - 120px)) !important;
    transform: translateY(calc(100% - 120px)) !important;
    padding: 0 16px 20px !important;
    max-height: 72vh !important;
  }

  .nike-bottom-sheet.expanded {
    -webkit-transform: translateY(0) !important;
    transform: translateY(0) !important;
  }

  /* ── Sheet handle area ─────────────────────────────────── */
  /* 3-column row: [← Home] [pill + hint] [spacer]             */
  .sv-sheet-handle-area {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    padding: 12px 14px 8px;
    min-height: 52px;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
  }

  /* Centre column: pill + hint stacked vertically */
  .sv-handle-center {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 5px;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
  }

  /* Right column: continuous price display */
  .sv-handle-price {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    margin-right: -4px;
    flex-shrink: 0;
  }

  .sv-price-label {
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .sv-price-value {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
  }

  /* ── Handle pill ──────────────────────────────────────── */
  .sheet-handle {
    width: 40px !important;
    height: 5px !important;
    background: #c4c4c4 !important;
    border-radius: 100px !important;
    margin: 0 !important;
    cursor: default !important;
    display: block !important;
    -webkit-transition: background 0.2s ease, width 0.2s ease !important;
    transition: background 0.2s ease, width 0.2s ease !important;
  }

  .sv-sheet-handle-area:active .sheet-handle {
    background: #999 !important;
    width: 50px !important;
  }

  /* ── Swipe hint ──────────────────────────────────────── */
  .sv-swipe-hint {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    -webkit-transition: opacity 0.25s ease;
    transition: opacity 0.25s ease;
  }

  /* JS no longer uses .hidden — text itself signals the action */
  .sv-swipe-hint.hidden {
    opacity: 1 !important;
  }
}

/* ── S&V viewer watermark (mobile only) ────────────────────── */
/* IMPORTANT: position:fixed not absolute — the element is placed */
/* outside viewer-section in the DOM, so it must be fixed to     */
/* appear over the viewer without affecting any layout flow.     */
.sv-viewer-logo {
  display: none;
}

@media (max-width: 768px) {
  .sv-viewer-logo {
    display: block;
    position: fixed;
    top: 18px;
    right: 18px;
    width: 32px;
    height: 32px;
    opacity: 0.45;
    pointer-events: none;
    z-index: 99;
    -webkit-filter: invert(0%);
    filter: invert(0%);
    transition: opacity 0.25s ease;
  }
}


/* ── Desktop recommendation banner ─────────────────────────── */
.sv-desktop-hint {
  display: none;
  /* hidden on desktop */
}

@media (max-width: 768px) {
  .sv-desktop-hint {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    gap: 10px;
    background: rgba(26, 26, 26, 0.88);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #f9fafb;
    font-size: 12px;
    line-height: 1.4;
    padding: 10px 14px;
    /* Fixed overlay — never participates in layout, canvas unaffected */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    overflow: hidden;
    max-height: 60px;
    opacity: 1;
    -webkit-transition: max-height 0.35s ease, opacity 0.35s ease;
    transition: max-height 0.35s ease, opacity 0.35s ease;
  }


  .sv-desktop-hint strong {
    color: #ffffff;
    font-weight: 700;
  }

  .sv-desktop-hint--hiding {
    max-height: 0 !important;
    opacity: 0 !important;
    margin-bottom: -1px !important;
  }

  .sv-desktop-hint-close {
    background: none;
    border: none;
    color: #d1d5db;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    border-radius: 50%;
    -webkit-transition: background 0.2s ease;
    transition: background 0.2s ease;
  }

  .sv-desktop-hint-close:active {
    background: rgba(255, 255, 255, 0.15);
  }
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  .sv-desktop-hint,
  .sv-desktop-hint--hiding,
  .sv-swipe-hint,
  .sheet-handle {
    -webkit-transition: none !important;
    transition: none !important;
  }
}

/* ============================================================
   END S&V UI Improvements — Batch 6
   ============================================================ */

/* ============================================================
   S&V UI IMPROVEMENTS — Batch 7
   Mobile: back-to-store button
   ============================================================ */

/* ── Mobile back-to-store button ───────────────────────────── */
/* Fixed pill at top-left of mobile viewport — always visible  */
/* ── Back-to-store button: inline inside sv-sheet-handle-area ─ */
/* Now a flex child (not fixed overlay) — black pill, left of  */
/* the centre handle-pill. Hidden on desktop.                   */
.sv-back-btn {
  display: none;
  /* hidden on desktop */
}

@media (max-width: 768px) {
  .sv-back-btn {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 4px;
    /* Inline element — NOT position:fixed any more */
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 100px;
    padding: 7px 11px 7px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    /* Prevent tap from bubbling up and toggling the sheet */
    z-index: 1;
    -webkit-transition: background 0.15s ease, -webkit-transform 0.12s ease;
    transition: background 0.15s ease, transform 0.12s ease;
  }

  .sv-back-btn:active {
    background: #333333;
    -webkit-transform: scale(0.94);
    transform: scale(0.94);
  }

  .sv-back-btn svg {
    -ms-flex-negative: 0;
    flex-shrink: 0;
  }
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .sv-back-btn {
    -webkit-transition: none !important;
    transition: none !important;
  }

  .view-btn {
    -webkit-transition: none !important;
    transition: none !important;
  }
}

/* ============================================================
   END S&V UI Improvements — Batch 7
   ============================================================ */

/* ============================================================
   S&V UI IMPROVEMENTS — Batch 9
   Chat bubble z-index, desktop-hint always-on, rotation fix
   ============================================================ */

/* ── Shopify / third-party chat widget — behind our sheet ────── */
/* On mobile our bottom sheet has z-index 9999. The chat bubble   */
/* is typically z-index 999999 which sits on top of everything.   */
/* We lower it to 100 on mobile so it naturally hides behind the  */
/* sheet when expanded. It remains visible when the sheet          */
/* is collapsed (the sheet only covers the bottom portion).       */
/* This is CSS-only, page-scoped — legally permissible.           */
@media (max-width: 768px) {

  /* Shopify Inbox */
  #shopify-chat,
  shopify-chat {
    z-index: 100 !important;
  }

  /* Common third-party chat iframes */
  #tidio-chat,
  #tidio-chat-iframe,
  #chat-widget,
  #crisp-chatbox,
  .crisp-client,
  #hubspot-messages-iframe-container,
  iframe[title*="chat" i],
  iframe[title*="Chat" i],
  iframe[src*="tidio"],
  iframe[src*="gorgias"],
  iframe[src*="intercom"],
  iframe[src*="zendesk"],
  iframe[src*="freshchat"] {
    z-index: 100 !important;
  }
}

/* ── Desktop hint: always sit above Shopify announcement bar ── */
/* Ensure the banner is visible (z-index of Shopify bar ~ 400) */
.sv-desktop-hint {
  z-index: 9998 !important;
}


/* ============================================================================ */
/* ACTION HELP MODAL - Premium Info Modals for Top Nav Buttons */
/* ============================================================================ */
.action-help-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-help-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.action-help-content {
  background: white;
  width: 90%;
  max-width: 400px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(30px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.action-help-modal.active .action-help-content {
  transform: translateY(0) scale(1);
}

.help-modal-header {
  padding: 32px 32px 12px;
  text-align: center;
}

.help-modal-icon {
  width: 64px;
  height: 64px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #1e293b;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.help-modal-icon svg {
  width: 30px;
  height: 30px;
}

.help-modal-header h3 {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.help-modal-body {
  padding: 0 32px 24px;
  text-align: center;
}

.help-modal-body p {
  font-size: 15px;
  line-height: 1.6;
  color: #64748b;
  margin: 0;
}

.help-modal-footer {
  padding: 8px 32px 32px;
  display: flex;
  gap: 12px;
}

.help-btn {
  flex: 1;
  padding: 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.help-btn-secondary {
  background: #f1f5f9;
  color: #475569;
}

.help-btn-secondary:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.help-btn-primary {
  background: #0f172a;
  color: white;
}

.help-btn-primary:hover {
  background: #000;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

/* Specific help modal variant colors */
.help-modal-danger .help-modal-icon {
  background: #fef2f2;
  border-color: #fee2e2;
  color: #ef4444;
}

.help-modal-danger .help-btn-primary {
  background: #ef4444;
}

.help-modal-danger .help-btn-primary:hover {
  background: #dc2626;
}

@media (max-width: 480px) {
  .help-modal-footer {
    flex-direction: column-reverse;
  }
}

/* ============================================================================
   SIZE CHART MODAL STYLES
   UX: Bottom-sheet (mobile) / centred dialog (desktop)
   Dismiss: ✕ button, "Back" CTA, overlay tap, swipe-down (mobile), ESC key
   ============================================================================ */
.sv-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  /* Centered instead of flex-end */
  justify-content: center;
  padding: 20px;
  /* Space around the modal */
  box-sizing: border-box;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: visibility 0.4s, opacity 0.4s ease;
}

.sv-modal.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.4s ease;
}

.sv-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

.sv-modal-content {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  /* or 100% since we have 20px padding around it */
  background: #ffffff;
  border-radius: 20px;
  /* Fully rounded all sides */
  box-sizing: border-box;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 10001;
  display: flex;
  flex-direction: column;
}

.sv-modal.active .sv-modal-content {
  transform: scale(1);
}

/* ── Drag handle hidden since it's no longer a bottom sheet ── */
.sv-modal-drag-handle {
  display: none;
}

.sv-modal-drag-pill {
  width: 40px;
  height: 5px;
  background: #d1d5db;
  border-radius: 100px;
  transition: background 0.2s ease, width 0.2s ease;
}

.sv-modal-drag-handle:active .sv-modal-drag-pill {
  background: #9ca3af;
  width: 50px;
}

/* ── Close ✕ button — high contrast, 44×44 touch target ─── */
.sv-modal-header {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 10;
}

.sv-modal-close {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  background: #1a1a1a;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s ease;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sv-modal-close:hover {
  background: #333333;
  transform: scale(1.05);
}

.sv-modal-close:active {
  background: #000000;
  transform: scale(0.95);
}

/* ── Modal body ──────────────────────────────────────────── */
.sv-modal-body {
  background: #ffffff;
  padding: 2rem 2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
}

.size-chart-mock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 450px;
  width: 100%;
}

.size-chart-logo {
  max-width: 100px;
  height: auto;
  margin-bottom: 0.25rem;
}

.size-chart-mock h2 {
  font-family: 'Jost', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #111827;
  margin: 0;
  text-transform: uppercase;
}

.size-placeholder {
  font-family: 'Jost', sans-serif;
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.6;
}

.size-placeholder p {
  margin: 0;
}

.size-placeholder p+p {
  margin-top: 1rem;
  color: #6b7280;
  font-size: 0.85rem;
}

/* ── Footer with "Back to Customiser" CTA ────────────────── */
.sv-modal-footer {
  padding: 16px 24px 24px;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

.sv-modal-back-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  background: #1a1a1a;
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  min-height: 52px;
}

.sv-modal-back-btn:hover {
  background: #333333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sv-modal-back-btn:active {
  background: #000000;
  transform: scale(0.98);
  box-shadow: none;
}

/* ── Footer padding for safe area (mobile notch) ───────────── */
@media (max-width: 767px) {
  .sv-modal-footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
}

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  .sv-modal,
  .sv-modal-content,
  .sv-modal-close,
  .sv-modal-back-btn,
  .sv-modal-drag-pill {
    transition: none !important;
  }
}

/* ============================================================================
   FULLSCREEN EXIT BUTTON
   Always visible when in fullscreen mode — all devices
   ============================================================================ */
.sv-fullscreen-exit-btn {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 99999;
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  border: none;
  border-radius: 100px;
  padding: 10px 18px 10px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.2px;
  transition: background 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.fullscreen-active .sv-fullscreen-exit-btn,
.fullscreen-mode .sv-fullscreen-exit-btn {
  display: inline-flex;
}

.sv-fullscreen-exit-btn:hover {
  background: rgba(51, 51, 51, 0.9);
  transform: scale(1.03);
}

.sv-fullscreen-exit-btn:active {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(0.97);
}
/* ── Batch 2: Desktop + Mobile Layout Refinement ────────────── */
/* Compact pill buttons (no icons, slim height) on all screen sizes */
.pill-option .pill-content svg {
  display: none !important;
}

.pill-option .pill-content {
  gap: 0 !important;
}

.pill-option {
  padding: 0.6rem 1rem !important;
  min-height: 44px !important; /* Standard premium height */
}

/* ============================================================
   S&V BADGE SYSTEM — CONTEXTUAL ACTION MENU (V3)
   ============================================================ */
.sv-badge-action-menu {
  position: fixed;
  z-index: 100000;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 5px;
  min-width: 120px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, -110%);
  animation: svMenuPop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  pointer-events: auto;
}

.sv-badge-action-menu::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid rgba(10, 10, 10, 0.95);
}

.sv-badge-action-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 7px;
  transition: all 0.2s ease;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}

.sv-badge-action-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

@media screen and (max-width: 768px) {
  .sv-badge-action-menu {
    min-width: 130px;
    padding: 5px;
  }

  .sv-badge-action-item {
    gap: 8px;
    padding: 9px 13px;
    font-size: 13px;
  }

  .sv-badge-action-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }
}

.sv-badge-action-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sv-badge-action-item.danger {
  color: #f87171;
}

.sv-badge-action-item.danger:hover {
  background: rgba(248, 113, 113, 0.15);
}

@keyframes svMenuPop {
  0% { opacity: 0; transform: translate(-50%, -90%) scale(0.9); }
  100% { opacity: 1; transform: translate(-50%, -110%) scale(1); }
}

/* Sidebar Remove Badge Button UI Polish */
.sv-remove-badge-btn {
  background: rgba(248, 113, 113, 0.1);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.sv-remove-badge-btn:hover {
  background: #f87171;
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(248, 113, 113, 0.3);
}

.sv-remove-badge-btn svg {
  display: block;
}

/* ── Mobile stud zone navigation — improved tap targets & affordance ──── */

/* Hide arrows on desktop by default */
.stud-nav-arrow {
  display: none;
}

@media (max-width: 1024px) {
  /* Row wrapper: arrows + dots side-by-side */
  .stud-nav-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
  }

  /* Dots: wider spacing so each is clearly a separate tap target */
  .stud-nav-dots {
    gap: 16px;
    margin-bottom: 0;
    align-items: center;
  }

  /* Slightly larger base dot on mobile */
  .stud-dot {
    width: 10px;
    height: 10px;
    transition: transform 0.25s ease, background 0.25s ease;
  }

  /* Active dot: 2× size so it's immediately obvious */
  .stud-dot.active {
    transform: scale(2);
    background: #111;
  }

  /* Directional arrow buttons */
  .stud-nav-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 8px;
    color: #6b7280;
    cursor: pointer;
    border-radius: 50%;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
  }

  .stud-nav-arrow:active {
    color: #111;
  }

  .stud-nav-arrow:disabled {
    opacity: 0.2;
    cursor: default;
  }
}

/* ============================================================
   HIDE PAGE TITLE ON JACKET CUSTOMIZER PAGE
   The theme renders a page <h1> title above the section
   which is not needed on the customizer page.
   ============================================================ */
/* Hide the entire "main" page section that renders the page title + empty RTE body */
body:has(.jacket-customizer-wrapper) .shopify-section > .page-width.page-content {
  display: none !important;
}

/* ============================================================
   SCROLL LOCK — customiser page only
   Prevent the user scrolling down to the footer, which
   disrupts the 3D canvas layout. The customiser is a
   full-viewport app — no scrolling needed.
   ============================================================ */
html:has(.jacket-customizer-wrapper),
body:has(.jacket-customizer-wrapper) {
  overflow: hidden !important;
  height: 100% !important;
  /* Preserve scroll position in case the theme applies a scroll offset */
  position: fixed;
  width: 100%;
}

/* Stud style icons (● round / ▲ pointed) inline in labels */
.stud-style-icon {
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
  flex-shrink: 0;
}

/* ============================================================
   PREMIUM ENTRANCE — borrowed from store theme heroFadeUp
   Subtle, one-time, on first paint only. No layout shift.
   ============================================================ */
@keyframes svFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel-header,
.config-section {
  opacity: 0;
  animation: svFadeUp 1.0s cubic-bezier(0.2, 0, 0, 1) forwards;
}

.panel-header                 { animation-delay: 0.10s; }
#gender-style-section         { animation-delay: 0.25s; }
#denim-color-section          { animation-delay: 0.32s; }
#studs-section                { animation-delay: 0.39s; }
#sv-badge-section             { animation-delay: 0.46s; }
#custom-badge-section         { animation-delay: 0.53s; }
#custom-text-section          { animation-delay: 0.60s; }

@media (prefers-reduced-motion: reduce) {
  .panel-header,
  .config-section {
    animation: none;
    opacity: 1;
  }
}

/* ============================================================
   PREMIUM MICRO-ANIMATIONS
   Subtle motion that makes the UI feel alive without distracting.
   ============================================================ */

/* Stagger-fade for content items when a section slides open */
@keyframes svContentIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.config-section.expanded .section-content .form-group,
.config-section.expanded .section-content .sub-section,
.config-section.expanded .section-content .size-chart-link-row {
  animation: svContentIn 0.28s ease both;
}
.config-section.expanded .section-content .form-group:nth-child(2),
.config-section.expanded .section-content .sub-section:nth-child(2) {
  animation-delay: 0.06s;
}
.config-section.expanded .section-content .form-group:nth-child(3),
.config-section.expanded .section-content .sub-section:nth-child(3) {
  animation-delay: 0.12s;
}
.config-section.expanded .section-content .form-group:nth-child(4),
.config-section.expanded .section-content .sub-section:nth-child(4) {
  animation-delay: 0.16s;
}

/* Colour swatch — brief pop on activation */
@keyframes svSwatchPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.color-option.active {
  animation: svSwatchPop 0.22s cubic-bezier(0.2, 0, 0, 1) both;
}

/* Section header — feather-light hover tint */
.section-header {
  transition: background 0.18s ease;
}
.section-header:hover {
  background: rgba(14, 14, 15, 0.025);
}

@media (prefers-reduced-motion: reduce) {
  .config-section.expanded .section-content .form-group,
  .config-section.expanded .section-content .sub-section,
  .color-option.active {
    animation: none;
  }
}

/* ─────────────────────────────────────────────────────────────────
   FOOTER HIERARCHY — Reset becomes a ghost (text-only) so the
   "Review Design" CTA visually anchors the bottom of the panel.
   The Total row gets an eyebrow label + large tabular numerals so
   the price feels like a deliberate moment, not body text.
   ───────────────────────────────────────────────────────────────── */
.panel-footer .btn-secondary {
  flex: 0 0 auto;
  padding: 0.875rem 1rem;
  border: 0;
  background: transparent;
  color: rgba(14, 14, 15, 0.55);
  font-weight: 500;
  letter-spacing: 0.02em;
  box-shadow: none;
  transition: color 0.18s ease;
}
.panel-footer .btn-secondary:hover {
  background: transparent;
  color: #0e0e0f;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transform: none;
  border-color: transparent;
}

.panel-footer .price-total {
  align-items: baseline;
  border-top: 1px solid rgba(14, 14, 15, 0.08);
}
.panel-footer .price-total > span:first-child {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(14, 14, 15, 0.55);
}
.panel-footer .price-total > span:last-child,
.panel-footer #total-price {
  font-size: 1.4rem;
  font-weight: 600;
  color: #0e0e0f;
  letter-spacing: 0.01em;
  font-feature-settings: "tnum";
}

/* ─────────────────────────────────────────────────────────────────
   FOCUS RINGS — visible keyboard indicators on every interactive
   element. Brand-green ring with 2px gap. :focus-visible only so
   mouse clicks don't show the ring. Critical for keyboard a11y.
   ───────────────────────────────────────────────────────────────── */
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.panel-footer .btn-secondary:focus-visible,
.section-header:focus-visible,
.section-toggle:focus-visible,
.view-btn:focus-visible,
.stud-nav-arrow:focus-visible,
.color-option:focus-visible,
.pill-option:focus-visible,
.footer-link-btn:focus-visible,
.icon-btn:focus-visible,
.action-btn:focus-visible,
.nav-logo-link:focus-visible,
.sv-review-confirm:focus-visible,
.sv-review-back:focus-visible,
.sv-review-close:focus-visible,
#share-design-btn:focus-visible,
.stud-dot:focus-visible {
  outline: 2px solid #298a30 !important;
  outline-offset: 2px !important;
  border-radius: 4px;
}
/* Color swatches are circles — match the rounding */
.color-option:focus-visible {
  border-radius: 50% !important;
}
/* The section-header doesn't have a border; ring on it would clip; use box-shadow instead */
.section-header:focus-visible {
  outline: 0 !important;
  box-shadow: inset 0 0 0 2px #298a30;
  border-radius: 4px;
}

/* ─────────────────────────────────────────────────────────────────
   VELVET CURTAIN — premium loading reveal.
   Logo breathes, the dark backdrop gets a soft radial warmth,
   the progress bar slims to a 1px monochrome line, and all text
   shifts to Jost with refined spacing. The canvas reveal (blur+scale)
   on hide is already in jacket.js — this is the build-up.
   ───────────────────────────────────────────────────────────────── */

/* Subtle radial vignette so the void doesn't feel flat */
.loading-spinner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.045) 0%,
    rgba(0, 0, 0, 0) 60%
  );
  pointer-events: none;
}

/* Logo gently breathes — signals 'alive, working' */
@keyframes svLogoBreath {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.04); }
}
.loading-spinner .loading-logo {
  animation: svLogoBreath 2.4s ease-in-out infinite;
  opacity: 0.7 !important;
  filter: invert(1) brightness(2) drop-shadow(0 0 14px rgba(255, 255, 255, 0.18)) !important;
}

/* Premium typography for loading text */
.loading-spinner .loading-text {
  font-family: 'Jost', sans-serif !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em !important;
  color: rgba(255, 255, 255, 0.88) !important;
  margin-top: 24px !important;
  margin-bottom: 0 !important;
}

/* Progress bar — slim 1px monochrome, longer ease */
.loading-spinner .loading-progress-container {
  width: 180px !important;
  height: 1px !important;
  background: rgba(255, 255, 255, 0.12) !important;
  margin-top: 22px !important;
  border-radius: 0 !important;
}
.loading-spinner .loading-progress-bar {
  height: 1px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  transition: width 0.45s cubic-bezier(0.2, 0, 0, 1) !important;
}
.loading-spinner .loading-progress-bar.complete {
  background: #298a30 !important;
}

/* Percentage + size — smaller, secondary, tabular numerals */
.loading-spinner .loading-info {
  margin-top: 16px !important;
}
.loading-spinner .loading-percentage {
  font-family: 'Jost', sans-serif !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.06em !important;
  color: rgba(255, 255, 255, 0.55) !important;
  font-feature-settings: "tnum" !important;
}
.loading-spinner .loading-size {
  font-family: 'Jost', sans-serif !important;
  font-size: 10px !important;
  letter-spacing: 0.04em !important;
  color: rgba(255, 255, 255, 0.4) !important;
  margin-top: 4px !important;
}

/* Device notice — quieter, less alarmed */
.loading-spinner .device-optimization-notice {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin-top: 32px !important;
  padding: 14px 18px !important;
  border-radius: 4px !important;
  max-width: 280px;
}
.loading-spinner .notice-text {
  font-family: 'Jost', sans-serif !important;
  font-size: 11px !important;
  color: rgba(255, 255, 255, 0.7) !important;
  line-height: 1.55 !important;
  letter-spacing: 0.02em !important;
  font-weight: 400 !important;
}

@media (prefers-reduced-motion: reduce) {
  .loading-spinner .loading-logo {
    animation: none;
    opacity: 0.9 !important;
  }
}

/* ─────────────────────────────────────────────────────────────────
   PANEL FOOTER META — Share design link (left) + 5am9t1 credit
   (right). Quiet 11px utilities. Brand-green hover on share.
   ───────────────────────────────────────────────────────────────── */
.panel-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  position: relative;
  z-index: 10;
}
.footer-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  background: transparent;
  border: 0;
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(14, 14, 15, 0.55);
  cursor: pointer;
  transition: color 0.2s ease;
}
.footer-link-btn:hover { color: #298a30; }
.footer-link-btn svg { flex-shrink: 0; }

.footer-credit-link {
  font-size: 11px;
  color: rgba(14, 14, 15, 0.55);  /* WCAG-AA contrast on the off-white footer */
  text-decoration: none;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: inline-block;
  transition: color 0.2s ease;
}
.footer-credit-link:hover { color: #0e0e0f; }

/* Toast notification — used by share-link copy and any future
   transient confirmations. Sits at bottom-centre of the viewport. */
.sv-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 22px;
  background: #0e0e0f;
  color: #fff;
  border-radius: 4px;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  z-index: 99999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition: opacity 0.3s ease, transform 0.32s cubic-bezier(0.2, 0, 0, 1);
}
.sv-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─────────────────────────────────────────────────────────────────
   FIRST-TIME PULSE — Section 1 (Base Configuration) header gently
   pulses until the user clicks any section header. localStorage
   guards against repeat showings on return visits.
   ───────────────────────────────────────────────────────────────── */
@keyframes svFirstPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(41, 138, 48, 0); }
  50%      { box-shadow: 0 0 0 6px rgba(41, 138, 48, 0.10); }
}

body.sv-first-time #gender-style-section .section-header {
  animation: svFirstPulse 2.4s ease-in-out infinite;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  body.sv-first-time #gender-style-section .section-header {
    animation: none;
  }
}

/* ============================================================
   Top-nav icons — thin-stroke SVGs (1.5px), inherit colour from
   the button. Weight controlled in CSS; hover lifts to full brand
   black. Mirrors the elegant outline style used on the storefront.
   ============================================================ */
.nav-right .icon-btn,
.nav-right .action-btn {
  color: rgba(14, 14, 15, 0.55) !important;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease !important;
}
.nav-right .icon-btn:hover,
.nav-right .action-btn:hover {
  color: #0e0e0f !important;
}
.nav-icon-svg {
  display: block;
}

/* ============================================================================
   STUD ACTIVATION HINT — one-time tooltip when user first activates a stud
   toggle. Points to the stud-colour picker so they remember it's there.
   ============================================================================ */
.sv-stud-hint {
  position: fixed;
  z-index: 100000;
  background: #0e0e0f;
  color: #ffffff;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  line-height: 1.45;
  padding: 16px 44px 16px 18px;
  border-radius: 12px;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.32), 0 4px 14px rgba(0, 0, 0, 0.2);
  max-width: 360px;
  opacity: 0;
  transition: opacity 0.32s ease, transform 0.32s ease;
  pointer-events: none;
}
/* Toast variant — viewport-centred at bottom, always visible */
.sv-stud-hint--toast {
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
}
.sv-stud-hint--toast.is-visible {
  transform: translateX(-50%) translateY(0);
}
.sv-stud-hint.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.sv-stud-hint__eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #298a30;
  font-weight: 600;
  margin-bottom: 4px;
}
.sv-stud-hint__msg {
  display: block;
  color: #ffffff;
  font-weight: 400;
}
.sv-stud-hint__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background 0.2s ease;
}
.sv-stud-hint__close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}
/* Subtle pulse on the stud colour swatches once when hint shows */
@keyframes sv-stud-color-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.sv-stud-color-pulse .color-option.swatch-silver,
.sv-stud-color-pulse .color-option.swatch-bronze,
.sv-stud-color-pulse .color-option.swatch-gold,
.sv-stud-color-pulse .color-option.swatch-black-metal {
  animation: sv-stud-color-pulse 1.2s ease-in-out 3;
}
/* Stronger pulse + brighter outline on the per-stud dots beside the
   activated toggle, so users discover the mix-and-match per-stud option. */
@keyframes sv-stud-dot-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(41, 138, 48, 0); }
  50% { transform: scale(1.35); box-shadow: 0 0 0 4px rgba(41, 138, 48, 0.35); }
}
.sv-stud-dot-pulse .stud-color-dot {
  animation: sv-stud-dot-pulse 1.3s ease-in-out 3;
}

/* ============================================================================
   FLOATING VIEWER TIP — speech-bubble-style instruction in negative space
   under the jacket. Visible only when badges are placed (body.has-badges).
   Tells users about press-and-hold removal which is otherwise invisible.
   ============================================================================ */
.sv-viewer-tip {
  position: absolute;
  left: 24px;
  bottom: 24px;
  display: none; /* shown when body has .has-badges */
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 14px;
  background: rgba(14, 14, 15, 0.92);
  color: #ffffff;
  border-radius: 999px;
  font-family: 'Jost', sans-serif;
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  max-width: 380px;
  box-shadow: 0 8px 24px rgba(14, 14, 15, 0.18), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 40;
  animation: sv-viewer-tip-in 0.34s cubic-bezier(0.2, 0, 0, 1);
  pointer-events: none; /* purely informational — clicks pass through */
}
body.has-badges .sv-viewer-tip {
  display: inline-flex;
}
.sv-viewer-tip__icon {
  flex-shrink: 0;
  color: #298a30;
}
.sv-viewer-tip__text {
  display: inline-block;
}
.sv-viewer-tip__text strong {
  color: #ffffff;
  font-weight: 600;
}
@keyframes sv-viewer-tip-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Dark viewer-theme: tip becomes light pill on dark, for contrast. */
.viewer-container.viewer-theme-dark .sv-viewer-tip {
  background: rgba(255, 255, 255, 0.95);
  color: #0e0e0f;
}
.viewer-container.viewer-theme-dark .sv-viewer-tip__text strong {
  color: #0e0e0f;
}

/* ============================================================================
   PANEL-LEVEL ONBOARDING HINT — how to use the accordion at all.
   Sits at the very top of .panel-content, above section 1.
   2026-05-10 v2: matched the refined section-hint look (white card,
   hairline border, micro-shadow, dash accent above title).
   ============================================================================ */
.sv-panel-howto {
  display: block;
  margin: 0.75rem 1.5rem 1.25rem;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid rgba(14, 14, 15, 0.08);
  border-radius: 4px;
  font-family: 'Jost', sans-serif;
  box-shadow: 0 1px 0 0 rgba(14, 14, 15, 0.02);
}
.sv-panel-howto::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: #298a30;
  margin-bottom: 10px;
}
.sv-panel-howto__eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0e0e0f;
  font-weight: 600;
  margin-bottom: 5px;
}
.sv-panel-howto__msg {
  display: block;
  font-size: 12.5px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: rgba(14, 14, 15, 0.72);
}

/* ============================================================================
   PER-SECTION ONBOARDING HINT — refined premium card.
   2026-05-10 v2: redesigned from "green-tinted left-bar" (looked AI-
   generic) to a white editorial card with a small green dash accent
   above the text. Hairline border, soft micro-shadow, Jost throughout.
   Reads as intentional rather than stamped-out.
   ============================================================================ */
.sv-section-hint {
  position: relative;
  display: block;
  margin: 0.5rem 0 1.25rem;
  padding: 14px 16px 14px 16px;
  background: #ffffff;
  border: 1px solid rgba(14, 14, 15, 0.08);
  border-radius: 4px;
  font-family: 'Jost', sans-serif;
  font-size: 12.5px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: rgba(14, 14, 15, 0.72);
  box-shadow: 0 1px 0 0 rgba(14, 14, 15, 0.02);
}
/* Editorial dash accent above the text — a single brand-green stroke. */
.sv-section-hint::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: #298a30;
  margin-bottom: 10px;
}
.sv-section-hint strong {
  font-weight: 600;
  color: #0e0e0f;
}

/* ============================================================================ */
/* Phase 2 (2026-05-11): disable Light Denim swatches for Men's.                 */
/* Men's customiser-base products only cover Blue + Black — no Light Denim base. */
/* JS toggles `body.sv-gender-male` (assets/jacket.js → syncGenderBodyClass()).  */
/* ============================================================================ */
body.sv-gender-male .swatch-light-denim,
body.sv-gender-male .option-item[data-color="Light Denim"] {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
  position: relative;
}
body.sv-gender-male .swatch-light-denim::after,
body.sv-gender-male .option-item[data-color="Light Denim"]::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient( 45deg, transparent calc(50% - 1px), rgba(14,14,15,0.55) calc(50% - 1px), rgba(14,14,15,0.55) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(-45deg, transparent calc(50% - 1px), rgba(14,14,15,0.55) calc(50% - 1px), rgba(14,14,15,0.55) calc(50% + 1px), transparent calc(50% + 1px));
  border-radius: inherit;
}

/* ============================================================================ */
/* Back Image Section — full-back custom print (2026-05-13)                      */
/* ============================================================================ */

/* Upload area — dashed drop zone style matching custom badge section */
.sv-back-image-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  background: #fafafa;
  margin: 12px 0;
  transition: border-color 0.2s;
}
.sv-back-image-upload-area:hover {
  border-color: #298a30;
}

/* Upload button */
.sv-back-image-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: #0e0e0f;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s, transform 0.1s;
}
.sv-back-image-upload-btn:hover {
  background: #298a30;
}
.sv-back-image-upload-btn:active {
  transform: scale(0.97);
}
.sv-back-image-upload-btn:focus-visible {
  outline: 2px solid #298a30;
  outline-offset: 2px;
}

/* Soft nudge — non-PNG advisory */
.sv-back-image-nudge {
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  color: #6b7280;
  margin: 0;
  text-align: center;
  padding: 6px 12px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 6px;
}

/* Controls area — thumbnail + scale */
.sv-back-image-controls {
  margin: 12px 0;
}

/* Thumbnail + remove row */
.sv-back-image-preview-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
.sv-back-image-thumb {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  background: #fff;
  flex-shrink: 0;
}
.sv-back-image-remove-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  margin-left: auto;
}
.sv-back-image-remove-btn:hover {
  border-color: #ef4444;
  color: #ef4444;
}
.sv-back-image-remove-btn:focus-visible {
  outline: 2px solid #298a30;
  outline-offset: 2px;
}

/* Drag hint */
.sv-back-image-hint {
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 12px;
}

/* Scale label + slider */
.sv-back-image-scale-label {
  display: flex;
  justify-content: space-between;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #0e0e0f;
  margin-bottom: 6px;
}
.sv-back-image-scale-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin-bottom: 16px;
  cursor: pointer;
}
.sv-back-image-scale-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #298a30;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.sv-back-image-scale-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #298a30;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Price line */
.sv-back-image-price-line {
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  padding: 8px 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
}
.sv-back-image-price-line strong {
  color: #15803d;
  font-weight: 600;
}

/* ============================================================================
   Design References — compact row UI
   2026-05-15: New accordion section. Each uploaded reference is a single row:
   [thumbnail] [editable name + placement select stacked] [preview/remove btns]
   ============================================================================ */
.sv-ref-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.sv-ref-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.sv-ref-row:hover {
  border-color: #d1d5db;
  background: #f5f5f5;
}
.sv-ref-thumb {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sv-ref-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sv-ref-thumb-fallback {
  color: #9ca3af;
}
.sv-ref-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0; /* allow flex children to truncate */
}
.sv-ref-name {
  width: 100%;
  padding: 6px 10px;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s ease;
}
.sv-ref-name:focus {
  border-color: #298a30;
}
.sv-ref-placement {
  width: 100%;
  padding: 6px 28px 6px 10px;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  color: #4b5563;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}
.sv-ref-placement:focus {
  outline: none;
  border-color: #298a30;
}
.sv-ref-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 4px;
}
.sv-ref-counter {
  font-family: 'Jost', sans-serif;
}
.sv-ref-counter__count {
  transition: color 0.2s ease;
}
.sv-ref-counter__price {
  color: #111827;
  transition: font-weight 0.2s ease;
}

@media (max-width: 480px) {
  .sv-ref-row {
    gap: 8px;
    padding: 8px;
  }
  .sv-ref-thumb {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
  }
}

/* ============================================================================
   Bespoke Base Chooser — full-viewport overlay (2026-05-15)
   Brand: Skinner & Vale atelier — black / cream / generous whitespace.
   Shown on first visit; pre-loads the chosen base before the customiser opens.
   ============================================================================ */
.sv-chooser-overlay {
  position: fixed;
  inset: 0;
  /* The 3D loading spinner uses z-index: 999999 !important — chooser must sit above it
     so first-visit customers see the chooser, not the loader. Same black background so
     no visual jolt; the loader keeps running underneath until the chosen model is ready. */
  z-index: 1000001;
  background: #0a0a0a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  font-family: 'Jost', sans-serif;
  animation: sv-chooser-fade-in 0.35s ease-out;
}
.sv-chooser-overlay[hidden] { display: none; }
/* 2026-05-15: while the chooser overlay is visible, hide the mobile customiser
   bottom-sheet (the "Swipe up to customise" bar). It's part of the customiser
   UX and shouldn't be visible until the user has picked a base. */
body:has(.sv-chooser-overlay:not([hidden])) .nike-bottom-sheet { display: none !important; }
.sv-chooser-overlay.sv-chooser-closing { animation: sv-chooser-fade-out 0.4s ease-in forwards; }
@keyframes sv-chooser-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes sv-chooser-fade-out {
  from { opacity: 1; }
  to { opacity: 0; visibility: hidden; }
}

.sv-chooser-card {
  width: 100%;
  max-width: 1080px;
  margin: auto;
  padding: 48px 40px;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.sv-chooser-header { text-align: center; }
.sv-chooser-eyebrow {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 16px;
  font-weight: 500;
}
.sv-chooser-title {
  /* 2026-05-15: matches the .col-banner-title convention from theme.css:
     weight 700, tight letter-spacing, uppercase. Aligns with the BESPOKE SERVICES
     hero on the rest of the store so the chooser feels like part of the brand. */
  font-family: 'Jost', sans-serif;
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
  margin: 0 0 18px;
  color: #ffffff;
}
.sv-chooser-subtitle {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  font-weight: 300;
}

.sv-chooser-legend {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
  font-weight: 500;
}
.sv-chooser-types, .sv-chooser-washes {
  border: 0;
  margin: 0;
  padding: 0;
}

.sv-chooser-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.sv-chooser-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.sv-chooser-tile:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
}
.sv-chooser-tile input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.sv-chooser-tile.is-selected,
.sv-chooser-tile:has(input:checked) {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}
.sv-chooser-tile__img-wrap {
  width: 100%;
  /* 2026-05-15: switched to 1:1. Source images are normalised to a square
     canvas with each garment auto-trimmed and re-centred at 88% scale, so all
     four tiles render the garment at the same visual size. */
  aspect-ratio: 1 / 1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.sv-chooser-tile__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease;
}
.sv-chooser-tile__img[src=""],
.sv-chooser-tile__img:not([src]) { opacity: 0; }
.sv-chooser-tile__meta {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sv-chooser-tile__label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
}
.sv-chooser-tile__price {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
}

.sv-chooser-wash-row {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}
.sv-chooser-wash {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px;
  border-radius: 10px;
  transition: background 0.2s ease;
}
.sv-chooser-wash:hover { background: rgba(255, 255, 255, 0.04); }
.sv-chooser-wash input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.sv-chooser-wash[data-disabled="true"] {
  opacity: 0.28;
  cursor: not-allowed;
  pointer-events: none;
}
.sv-chooser-wash__swatch {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.sv-chooser-wash:has(input:checked) .sv-chooser-wash__swatch {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
  transform: scale(1.05);
}
.sv-chooser-wash--light { background: linear-gradient(135deg, #c9d8e3, #94a8b8); }
.sv-chooser-wash--blue  { background: linear-gradient(135deg, #4a6584, #2b3e54); }
.sv-chooser-wash--black { background: linear-gradient(135deg, #2b2b2b, #0a0a0a); }
.sv-chooser-wash__label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}
.sv-chooser-wash-note {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin: 14px 0 0;
  font-style: italic;
}

/* Size selector — pill row matching the wash row aesthetic */
.sv-chooser-size-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sv-chooser-size {
  cursor: pointer;
  padding: 12px 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  background: transparent;
  min-width: 64px;
  text-align: center;
}
.sv-chooser-size:hover {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.04);
}
.sv-chooser-size input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.sv-chooser-size:has(input:checked) {
  background: #ffffff;
  border-color: #ffffff;
}
.sv-chooser-size:has(input:checked) .sv-chooser-size__label {
  color: #0a0a0a;
}
.sv-chooser-size__label {
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}
@media (max-width: 480px) {
  .sv-chooser-size { padding: 10px 16px; min-width: 52px; }
  .sv-chooser-size__label { font-size: 12px; letter-spacing: 0.1em; }
}

/* Size chart link underneath the size pills — brand green, atelier voice */
.sv-chooser-size-chart-line {
  text-align: center;
  margin: 14px 0 0;
}
.sv-chooser-size-chart-link {
  background: none;
  border: 0;
  padding: 4px 0;
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #298a30;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.sv-chooser-size-chart-link:hover { color: #2fa238; }

.sv-chooser-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.sv-chooser-cta {
  background: #ffffff;
  color: #0a0a0a;
  padding: 16px 48px;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.sv-chooser-cta:hover:not(:disabled) { transform: translateY(-1px); background: #f4f4f4; }
.sv-chooser-cta:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.5);
}
.sv-chooser-fineprint {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

/* Inline "Change base" link inside Section 1 — for users who want to swap after entry */
.sv-change-base-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #298a30;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 4px 0;
  font-family: 'Jost', sans-serif;
}
.sv-change-base-link:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .sv-chooser-card { padding: 32px 20px; gap: 28px; }
  .sv-chooser-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .sv-chooser-tile__meta { padding: 10px 12px 12px; }
  .sv-chooser-tile__label { font-size: 12px; }
  .sv-chooser-tile__price { font-size: 11px; }
  .sv-chooser-wash-row { gap: 18px; }
  .sv-chooser-wash__swatch { width: 48px; height: 48px; }
}
@media (max-width: 380px) {
  .sv-chooser-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
   SV Modal — shared brand modal shell (2026-05-15)
   ============================================================================
   ONE pattern for all customiser modals — white card on dark blurred backdrop,
   centered eyebrow + title + optional subtitle, body, ghost+primary buttons.
   Each modal keeps its own body content; only the shell is shared.

   Applied to: continue-design, customisation-required, size-confirmation,
   gender-change, design-manager, file-preview, sv-review, size-chart.
   ============================================================================ */
.svm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 14, 15, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  padding: 20px;
  font-family: 'Jost', sans-serif;
  animation: svmFadeIn 0.32s ease;
}
.svm-overlay.fade-out { animation: svmFadeOut 0.3s ease forwards; }
@keyframes svmFadeIn  { from {opacity:0} to {opacity:1} }
@keyframes svmFadeOut { from {opacity:1} to {opacity:0} }
@keyframes svmSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.svm-card {
  background: #ffffff;
  border-radius: 6px;
  max-width: 520px;
  width: 100%;
  max-height: calc(100vh - 40px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: svmSlideUp 0.42s cubic-bezier(0.2, 0, 0, 1);
}
.svm-card--wide { max-width: 720px; }

.svm-header {
  text-align: center;
  padding: 44px 32px 26px;
  background: #ffffff;
  border-bottom: 1px solid rgba(14, 14, 15, 0.08);
  position: relative;
  flex-shrink: 0;
}
.svm-eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(14, 14, 15, 0.5);
  margin: 0 0 14px;
  font-family: 'Jost', sans-serif;
}
.svm-title {
  font-size: 26px;
  font-weight: 400;
  color: #0e0e0f;
  margin: 0 0 8px;
  font-family: 'Jost', sans-serif;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.svm-subtitle {
  font-size: 13px;
  color: rgba(14, 14, 15, 0.55);
  margin: 0;
  font-family: 'Jost', sans-serif;
  font-weight: 300;
}
.svm-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: rgba(14, 14, 15, 0.5);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}
.svm-close:hover {
  color: #0e0e0f;
  background: rgba(14, 14, 15, 0.04);
}

.svm-body {
  padding: 22px 32px;
  overflow-y: auto;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(14, 14, 15, 0.78);
  flex: 1 1 auto;
}
.svm-body p { margin: 0 0 12px; }
.svm-body p:last-child { margin-bottom: 0; }
.svm-body h4 {
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(14, 14, 15, 0.6);
  margin: 0 0 12px;
}

.svm-actions {
  display: flex;
  gap: 10px;
  padding: 18px 32px 32px;
  background: #ffffff;
  border-top: 1px solid rgba(14, 14, 15, 0.08);
  flex-shrink: 0;
}
.svm-btn {
  flex: 1;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 0;
  font-family: 'Jost', sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}
.svm-btn--secondary {
  background: transparent !important;
  color: rgba(14, 14, 15, 0.65) !important;
}
.svm-btn--secondary:hover {
  color: #0e0e0f !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.svm-btn--primary {
  flex: 1.4;
  background: #0e0e0f !important;
  color: #ffffff !important;
}
.svm-btn--primary:hover {
  background: #298a30 !important;
  box-shadow: 0 6px 18px rgba(41, 138, 48, 0.3);
}

/* Single-button footer (e.g. customisation-required has one CTA) */
.svm-actions--single .svm-btn { flex: 1; }

@media (max-width: 480px) {
  .svm-header { padding: 32px 24px 20px; }
  .svm-title { font-size: 22px; }
  .svm-body { padding: 18px 24px; }
  .svm-actions { padding: 16px 24px 24px; flex-direction: column; }
  .svm-btn { width: 100%; }
}

/* ============================================================================
   S&V UI IMPROVEMENTS — Batch 7
   Mobile: safe-zone padding fix, density improvements, chooser light pass
   2026-05-16
   ============================================================================ */

/* ── Block 1: Sheet safe-zone padding ──────────────────────────────────────
   Fixes the iPhone 14 Pro clipping bug (Sam screenshot 2026-05-16 11:27 BST).
   Belt-and-braces: explicit safe-area-inset handling + overflow-x: clip to
   prevent transformed children (scale/translate pill options) from bleeding.   */
@media (max-width: 767px) {
  .nike-bottom-sheet {
    padding-top: 0 !important;
    padding-right: max(16px, env(safe-area-inset-right)) !important;
    padding-bottom: max(20px, env(safe-area-inset-bottom)) !important;
    padding-left: max(16px, env(safe-area-inset-left)) !important;
    overflow-x: clip !important;
  }

  .sv-sheet-handle-area {
    padding-right: max(14px, env(safe-area-inset-right)) !important;
    padding-left: max(14px, env(safe-area-inset-left)) !important;
  }
}

/* ── Block 2: Tighter step header (~14–16px reclaimed per step) ─────────────
   Inline styles in jacket.liquid beat selector specificity — !important needed. */
@media (max-width: 767px) {
  .nike-bottom-sheet .step-header {
    margin-bottom: 12px !important;
  }

  .nike-bottom-sheet .step-indicator {
    font-size: 11px !important;
    margin-bottom: 2px !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
  }

  .nike-bottom-sheet .step-title {
    font-size: 16px !important;
    line-height: 1.25 !important;
  }

  .nike-bottom-sheet .nav-arrow {
    width: 36px !important;
    height: 36px !important;
  }
}

/* ── Block 3: Handle price pill polish ──────────────────────────────────────
   Already lives in handle row right column (.sv-handle-price). Light tighten
   only — saves ~4px horizontal so the row breathes on 360px-wide phones.      */
@media (max-width: 767px) {
  .sv-handle-price {
    padding: 5px 10px !important;
    gap: 5px !important;
  }

  .sv-price-label {
    font-size: 9px !important;
    letter-spacing: 0.06em !important;
  }

  .sv-price-value {
    font-size: 12px !important;
    font-feature-settings: "tnum";
  }
}

/* ── Block 4: Pill-grid safety net (defence in depth) ───────────────────────
   minmax(100px, 1fr) → minmax(0, 1fr): prevents grid items forcing a 100px
   minimum that overflows a narrow phone. min-width: 0 lets items shrink below
   content-min. transform-origin: center keeps scale(1.02) centred, not clipping
   outside the container.                                                        */
@media (max-width: 767px) {
  .nike-bottom-sheet .pill-grid {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .nike-bottom-sheet .pill-option {
    min-width: 0 !important;
    padding: 0.5rem 0.6rem !important;
    font-size: 13px !important;
    transform-origin: center !important;
  }
}

/* ── Block 5: Chooser overlay light pass (choice 2C) ────────────────────────
   .sv-chooser-overlay was padding: 24px, .sv-chooser-card was padding: 48px 40px.
   On 390px viewport, 40px horizontal card padding ate 80px unnecessarily.
   Outer overlay now provides the safe-area gutter; card just needs vert room.  */
@media (max-width: 767px) {
  .sv-chooser-overlay {
    padding: max(16px, env(safe-area-inset-top))
             max(16px, env(safe-area-inset-right))
             max(16px, env(safe-area-inset-bottom))
             max(16px, env(safe-area-inset-left)) !important;
  }

  .sv-chooser-card {
    padding: 32px 4px !important;
  }
}

/* ── Block 6: Dark-mode-ready selector hooks (choice 3C) ────────────────────
   Empty rules now — populated in a future session when dark theme ships.       */
@media (max-width: 767px) {
  .viewer-theme-dark .nike-bottom-sheet,
  .viewer-theme-dark .sv-handle-price,
  .viewer-theme-dark .sv-price-label,
  .viewer-theme-dark .sv-price-value,
  .viewer-theme-dark .step-indicator,
  .viewer-theme-dark .step-title {
    /* intentionally empty — colour overrides to be added when dark mode lands */
  }
}

/* ============================================================================
   END S&V UI Improvements — Batch 7
   ============================================================================ */

/* ============================================================================
   S&V UI IMPROVEMENTS — Batch 8
   Mobile: 50vh sheet cap + canvas height states for jacket visibility
   2026-05-16 — Sam iPhone 12 Pro Max feedback
   ============================================================================ */

/* ── Block 1: Hard 50vh cap on expanded sheet ───────────────────────────────
   Replaces 72vh from Batch 6. At 926px (iPhone 12 Pro Max) this frees 200px
   of jacket real-estate that was buried under the sheet on steps 3–8.
   Applies to all 9 steps uniformly per Sam's choice 1B.                       */
@media (max-width: 767px) {
  .nike-bottom-sheet.expanded {
    max-height: 50vh !important;
  }
}

/* ── Block 2: Canvas height states synced to sheet position ─────────────────
   Two states driven by sheet class, no JS needed.
   • Default (sheet peek, 120px visible): viewer fills viewport minus header
     (64px) minus peek (120px) = calc(100vh - 184px).
   • Sheet expanded (50vh): viewer fills top 50vh minus header (64px).
     Transition matches the sheet's 0.3s ease so canvas resize feels smooth.
   Common ancestor confirmed: .jacket-customizer-wrapper (jacket.liquid L381)
   contains both .viewer-section and #nike-bottom-sheet as descendants.
   :has() support: iOS 16+, Safari 16+, Chrome 105+ — covers all target devices. */
@media (max-width: 767px) {
  .viewer-section {
    height: calc(100vh - 184px) !important;
    max-height: calc(100vh - 184px) !important;
    min-height: 200px !important;
    -webkit-transition: height 0.3s ease, max-height 0.3s ease !important;
    transition: height 0.3s ease, max-height 0.3s ease !important;
  }

  .jacket-customizer-wrapper:has(#nike-bottom-sheet.expanded) .viewer-section {
    height: calc(50vh - 64px) !important;
    max-height: calc(50vh - 64px) !important;
  }
}

/* ── Block 3: Canvas children fill their parent ─────────────────────────────
   Ensures .viewer-container and the Three.js canvas element (#3d-preview-container)
   always fill 100% of .viewer-section's new constrained height.
   The 3D scene auto-fits whatever bounds the canvas gives it — reducing the
   canvas height moves the model up naturally without touching _o camera config. */
@media (max-width: 767px) {
  .viewer-container,
  #3d-preview-container {
    height: 100% !important;
    max-height: none !important;
  }
}

/* ============================================================================
   END S&V UI Improvements — Batch 8
   ============================================================================ */


/* ============================================================================
   BATCH 10 — SV Badge Gallery Mobile Redesign (2026-05-19)
   ============================================================================
   Sam-approved layout: Option C (image-led, 4 cols, name overlay bar).
   Selected state: signature green (#298a30) border + tick + name-bar.
   Image sized via max-width/max-height so it never crops against the name-bar.
   Mockup reference: projects/SkinnerAndVale/output/badge-gallery-mockup.html
   Save points: theme-backups/20260519-10*-MAIN-* + DEV theme #199317193041
   ============================================================================ */
@media (max-width: 768px) {

  /* Badge tile becomes a square, image-led card */
  .sv-badge-thumbnail {
    padding: 8px 6px 22px !important;     /* extra bottom padding reserves room for name-bar */
    min-height: 0 !important;             /* override desktop fixed min-height */
    aspect-ratio: 1 / 1 !important;       /* force square */
    background: #fafafa !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 10px !important;
    gap: 0 !important;                    /* override desktop flex gap */
  }

  /* Image container fills the tile, transparent bg */
  .sv-badge-thumbnail .sv-badge-image {
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
    aspect-ratio: auto !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Actual badge image is shrunk so it never reaches the name-bar */
  .sv-badge-thumbnail .sv-badge-image img,
  .sv-badge-thumbnail .sv-badge-image svg {
    max-width: 78% !important;
    max-height: 65% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
  }

  /* Name = blurred white bar at the bottom of the tile */
  .sv-badge-thumbnail .sv-badge-name {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    background: rgba(255,255,255,0.92) !important;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    font-size: 9px !important;
    font-weight: 500 !important;
    padding: 2px 4px !important;
    text-align: center !important;
    color: #1d1d1e !important;
    border-top: 1px solid rgba(0,0,0,0.05) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
  }

  /* Price = small dark chip top-left */
  .sv-badge-thumbnail .sv-badge-price {
    position: absolute !important;
    top: 4px !important;
    left: 4px !important;
    background: #1d1d1e !important;
    color: #ffffff !important;
    font-size: 8px !important;
    font-weight: 600 !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
    margin: 0 !important;
    z-index: 1 !important;
  }

  /* SELECTED — signature green border + green tick + green name-bar */
  .sv-badge-thumbnail.selected {
    border-color: #298a30 !important;
    border-width: 3px !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 2px rgba(41,138,48,0.18), 0 4px 12px rgba(0,0,0,0.08) !important;
    transform: none !important;          /* override any desktop hover scale */
  }
  .sv-badge-thumbnail.selected .sv-badge-name {
    background: #298a30 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
  }
  .sv-badge-thumbnail.selected::after {
    content: "✓";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: #298a30;
    color: #ffffff;
    border-radius: 50%;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 2;
  }
}
/* ============================================================================
   END BATCH 10 — SV Badge Gallery Mobile Redesign
   ============================================================================ */


/* ============================================================================
   BATCH 10 — Issue 4: Hide bottom-sheet during loading (2026-05-19)
   ============================================================================
   PROBLEM: On mobile Safari, .nike-bottom-sheet (z-index: 9999, position: fixed,
   transform: translateY) paints ABOVE .loading-spinner (z-index: 999999,
   position: fixed) because Safari's compositor treats fixed+transform elements
   as separate GPU layers and z-index doesn't always win across layers.
   Result: users see "SWIPE UP TO CUSTOMISE" pill + Home button + total price
   over the black loading screen — they can TAP and break the system mid-load.
   FIX: when .loading-spinner.show exists, hide the bottom sheet entirely
   (visibility for visuals, pointer-events for safety against accidental taps).
   :has() selector is iOS 15.4+ — already used elsewhere in this file.
   Sam-flagged 2026-05-19 testing session. See MOBILE_TESTING_2026-05-19.md.
   ============================================================================ */
body:has(.loading-spinner.show) .nike-bottom-sheet {
  visibility: hidden !important;
  pointer-events: none !important;
}
/* ============================================================================
   END Issue 4 fix
   ============================================================================ */


/* ============================================================================
   BATCH 10 — Issue 2: Mobile chooser — scroll cue + tighter button spacing (2026-05-19)
   ============================================================================
   PROBLEM: On the "Choose Your Base" chooser, mobile users select a jacket
   tile but don't realise the next CTAs ("View Size Chart" + "Start Customising")
   live below the fold. Additionally, the vertical gap between those two CTAs
   reads as too generous on small screens.
   FIX (CSS-only, additive, uses :has() — iOS 15.4+):
   1. Tighten footer spacing (margin-top + gap)
   2. Animated scroll-down cue appears below the tile grid the moment any
      jacket tile is tapped (signals "scroll for next step")
   3. Soft signature-green pulse on the Start Customising CTA once enabled
      (catches the eye when scrolled into view)
   Sam-flagged 2026-05-19 testing session. See MOBILE_TESTING_2026-05-19.md.
   ============================================================================ */
@media (max-width: 480px) {

  /* 1) Tighten vertical rhythm at the bottom of the chooser */
  .sv-chooser-size-chart-line {
    margin: 8px 0 0 !important;       /* was 14px 0 0 */
  }
  .sv-chooser-footer {
    margin-top: 4px !important;       /* was 12px */
    gap: 8px !important;              /* was 12px */
  }

  /* 2) Scroll-down cue — v6: pill exists from page-load but visibility: hidden
        (Safari :has() + ::after repaint quirk workaround — the pseudo must exist
        with all its styling FIRST, then :has() just flips visibility — Safari
        will repaint a visibility change, but won't repaint a newly-created pseudo).
        - Default state: visibility hidden (pill not visible, no noise on first impression)
        - User picks any jacket tile → visibility becomes visible (pill appears)
        - User dismisses chooser (overlay gone) → pseudo gone naturally
        - Step 5 (hide on scroll) coming separately if Sam wants it after testing this. */
  .sv-chooser-overlay::after {
    content: "↓ SCROLL DOWN";
    position: fixed;
    /* v4: 100px from bottom clears iOS Safari's URL/tabs bar (~50-80px tall) */
    bottom: calc(env(safe-area-inset-bottom, 0px) + 100px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 10, 0.92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(41, 138, 48, 0.5);
    color: #298a30;
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    padding: 10px 20px;
    border-radius: 999px;
    animation: sv-scroll-hint 1.4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1000002;          /* above .sv-chooser-overlay's 1000001 */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
    /* v6: hidden by default — only shows when user has picked a tile */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s;
  }

  /* v8: REVEAL the pill ONLY after USER engagement (not on the default pre-selected
     radio at page load). Paired with the tiny inline script in jacket.liquid that
     adds .sv-user-engaged to the overlay on first pointerdown/change. v7 fired
     immediately on page load because the chooser ships with a pre-checked radio,
     making :has(input:checked) match before the user actually tapped anything. */
  .sv-chooser-overlay.sv-user-engaged::after {
    visibility: visible;
    opacity: 1;
  }

  /* 3) Soft signature-green pulse on the Start Customising CTA once enabled */
  .sv-chooser-cta:not(:disabled) {
    animation: sv-cta-pulse 2.2s ease-in-out infinite;
  }
}

@keyframes sv-scroll-hint {
  0%, 100% { transform: translateY(0);  opacity: 0.7; }
  50%      { transform: translateY(6px); opacity: 1; }
}

@keyframes sv-cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(41,138,48,0); }
  50%      { box-shadow: 0 0 0 8px rgba(41,138,48,0.22); }
}
/* ============================================================================
   END Issue 2 fix
   ============================================================================ */
