/* ==========================================================================
   STICKYPIX PREMIUM UNIFIED STYLESHEET (ULTRA CALIBER)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & Core Variables
   -------------------------------------------------------------------------- */
:root {
  /* Typography */
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', system-ui, -apple-system, sans-serif;

  /* Color Palette (HSL Tailored) */
  --primary-hue: 245;
  --primary: hsl(var(--primary-hue), 75%, 45%);
  --primary-light: hsl(var(--primary-hue), 80%, 96%);
  --primary-dark: hsl(var(--primary-hue), 85%, 25%);
  --primary-glow: rgba(73, 56, 219, 0.15);
  
  --secondary: hsl(12, 85%, 60%); /* Coral Sunset Highlight */
  --secondary-glow: rgba(240, 94, 66, 0.15);
  
  --dark: hsl(220, 15%, 12%);
  --light: hsl(210, 20%, 98%);
  
  --grey-50: hsl(210, 20%, 98%);
  --grey-100: hsl(210, 16%, 93%);
  --grey-200: hsl(210, 14%, 86%);
  --grey-300: hsl(210, 10%, 75%);
  --grey-600: hsl(210, 8%, 45%);
  --grey-800: hsl(210, 10%, 25%);
  
  --white: #ffffff;
  --black: #000000;
  
  /* Status Colors */
  --success: hsl(145, 63%, 42%);
  --success-light: hsl(145, 70%, 95%);
  --warning: hsl(38, 92%, 50%);
  --warning-light: hsl(38, 85%, 94%);
  --danger: hsl(354, 70%, 54%);
  --danger-light: hsl(354, 70%, 96%);

  /* UI Transitions & Shadows */
  --transition-bezier: cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Spring Physics Feel */
  --transition-smooth: all 0.5s var(--transition-bezier);
  --transition-fast: all 0.2s ease;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.18);
  --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.06);

  /* Layout Constants */
  --navbar-height: 80px;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 32px;
}

/* --------------------------------------------------------------------------
   2. Reset & Global Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color: var(--dark);
  background-color: var(--white);
  font-family: var(--font-primary);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p {
  line-height: 1.6;
  color: var(--grey-600);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  transition: var(--transition-smooth);
}

.hidden {
  display: none !important;
}

/* Confetti Fullscreen Overlay */
.confetti-overlay-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--grey-50);
}
::-webkit-scrollbar-thumb {
  background: var(--grey-200);
  border-radius: var(--border-radius-sm);
  border: 2.5px solid var(--grey-50);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--grey-300);
}

/* --------------------------------------------------------------------------
   3. Single Page Router
   -------------------------------------------------------------------------- */
.spa-view {
  display: none;
  opacity: 0;
  transform: translateY(16px) scale(0.99);
  transition: opacity 0.5s var(--transition-bezier),
              transform 0.5s var(--transition-bezier);
  min-height: calc(100vh - var(--navbar-height));
  content-visibility: auto;
}

.spa-view.active {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.04);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.admin-nav-link:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   4. Common Layout Modules
   -------------------------------------------------------------------------- */
.section-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 16px;
  border-radius: var(--border-radius-lg);
  margin-bottom: 16px;
  font-family: var(--font-display);
}

.section-header {
  margin-bottom: 50px;
  max-width: 650px;
}

.section-header.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
  line-height: 1.1;
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--grey-600);
}

.highlight {
  color: var(--primary);
  background: linear-gradient(120deg, var(--primary-light) 0%, rgba(220, 218, 255, 0.4) 100%);
  padding: 0 4px;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  padding: 16px 36px;
  border-radius: var(--border-radius-lg);
  font-size: 1.05rem;
  box-shadow: 0 8px 24px rgba(73, 56, 219, 0.25);
}

.primary-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(73, 56, 219, 0.35);
}

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

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--grey-50);
  color: var(--grey-800);
  font-weight: 600;
  padding: 16px 36px;
  border-radius: var(--border-radius-lg);
  font-size: 1.05rem;
  border: 1px solid var(--grey-200);
}

.secondary-btn:hover {
  background: var(--grey-100);
  transform: translateY(-2px);
}

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

/* Navigation bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--navbar-height);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition-smooth);
}

.nav-container {
  max-width: 1300px;
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-actions-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--dark);
  order: 3;
}

.nav-links { order: 2; }
.nav-actions-group { order: 1; }

.logo-icon {
  color: var(--primary);
  filter: drop-shadow(0 2px 6px rgba(73, 56, 219, 0.2));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--grey-600);
}

.nav-link:hover {
  color: var(--primary);
}

.nav-btn {
  background: var(--dark);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
}

.nav-btn:hover {
  background: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(73, 56, 219, 0.2);
}

/* Synthesized audio speaker button */
.audio-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey-600);
}

.audio-toggle-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  transform: scale(1.05);
}

/* --------------------------------------------------------------------------
   5. Hero & Curvilinear 3D Peel Corner Playground
   -------------------------------------------------------------------------- */
.hero-section {
  padding-top: calc(var(--navbar-height) + 60px);
  padding-bottom: 80px;
  background: radial-gradient(circle at top right, var(--primary-light) 0%, var(--white) 65%);
}

.hero-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--dark);
  line-height: 1.05;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--grey-600);
  margin-bottom: 40px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-features {
  display: flex;
  gap: 32px;
}

.hero-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--grey-800);
  font-weight: 500;
  font-size: 0.9rem;
}

.hero-feature-item svg {
  color: var(--primary);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.peel-card {
  width: 100%;
  max-width: 460px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--grey-100);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.peel-header {
  margin-bottom: 20px;
  text-align: center;
}

.peel-header h3 {
  font-size: 1.25rem;
  color: var(--dark);
  margin-bottom: 4px;
}

.peel-header p {
  font-size: 0.85rem;
  color: var(--grey-600);
}

.peel-wall {
  position: relative;
  height: 380px;
  background-color: #e5e9f0;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-inset);
  perspective: 1200px;
}

.wall-texture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  background-image: radial-gradient(circle, #000 10%, transparent 11%),
                    radial-gradient(circle, #000 10%, transparent 11%);
  background-size: 12px 12px;
  background-position: 0 0, 6px 6px;
  pointer-events: none;
}

/* Advanced Multi-Layer Peeling Container */
.peel-frame-container {
  width: 240px;
  height: 240px;
  position: relative;
  z-index: 10;
  transform-style: preserve-3d;
  cursor: grab;
  transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.peel-frame-container:active {
  cursor: grabbing;
}

/* Layer 1: Exposes adhesive backing under peeled corner */
.peel-back-adhesive {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #2b303b;
  border: 4px solid #1f232b;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  color: var(--white);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.4);
  z-index: 1;
}

/* Layer 2: The curled corner fold */
.peel-back-curl {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 90px;
  height: 90px;
  transform-origin: top left;
  transform: rotate(-45deg) translate3d(63px, -63px, 5px) scaleY(-1);
  transition: transform 1.2s cubic-bezier(0.15, 0.85, 0.35, 1),
              opacity 1.2s ease;
  opacity: 0;
  z-index: 3;
  pointer-events: none;
}

.curl-paper {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ffffff 0%, #e5e9f0 45%, #929bb0 55%, #2b303b 100%);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  border-radius: 0 0 4px 0;
  box-shadow: -8px -8px 20px rgba(0,0,0,0.25);
}

.curl-shadow {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.2);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  filter: blur(4px);
  z-index: -1;
}

/* Layer 3: Front-face photo frame */
.peel-front-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  transition: clip-path 1.2s cubic-bezier(0.15, 0.85, 0.35, 1);
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Trigger states */
.peel-frame-container.is-peeled .peel-front-container {
  clip-path: polygon(0% 0%, 100% 0%, 100% 70%, 70% 100%, 0% 100%);
}

.peel-frame-container.is-peeled .peel-back-curl {
  opacity: 1;
  transform: rotate(135deg) translate3d(32px, -32px, 20px) scaleY(-1);
}

.peel-controls {
  position: absolute;
  bottom: 16px;
  z-index: 20;
  display: flex;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   6. Immersive Design Studio Layout & Accent Mood Lighting (`#/studio`)
   -------------------------------------------------------------------------- */
.studio-workspace {
  padding-top: var(--navbar-height);
  max-width: 1300px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
  padding-bottom: 60px;
}

.studio-header {
  margin-bottom: 30px;
  border-bottom: 1px solid var(--grey-100);
  padding-bottom: 16px;
  padding-top: 20px;
}

.studio-steps {
  display: flex;
  gap: 40px;
  justify-content: center;
}

.studio-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  position: relative;
  cursor: pointer;
  opacity: 0.6;
  transition: var(--transition-fast);
}

.studio-step:hover { opacity: 0.9; }
.studio-step.active { opacity: 1; }

.studio-step.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary);
  border-radius: 4px;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--grey-100);
  color: var(--grey-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.studio-step.active .step-num {
  background: var(--primary);
  color: var(--white);
}

.step-text {
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-display);
}

/* Workspace split grids */
.workspace-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 40px;
  align-items: start;
}

.canvas-panel {
  position: sticky;
  top: calc(var(--navbar-height) + 20px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 3D Room Canvas Backings */
.room-canvas {
  width: 100%;
  height: 520px;
  position: relative;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.room-canvas.room-living { background-color: #eae6df; }
.room-canvas.room-bedroom { background-color: #c9d3c5; }
.room-canvas.room-office { background-color: #3b4252; }
.room-canvas.room-staircase { background-color: #f3f3f5; }

.room-lifestyle-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.shadow-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.06) 100%);
  mix-blend-mode: multiply;
  transition: background 1.2s;
}

/* Accent Lighting Ray filter effects */
.light-ray-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 150%;
  height: 150%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 50%);
  mix-blend-mode: overlay;
  pointer-events: none;
  transform: translate(-20%, -20%) rotate(-15deg);
  transition: background 1.2s, opacity 1.2s;
}

/* Flora Shadow casting overlays */
.flora-shadow-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 260px;
  height: 100%;
  pointer-events: none;
  color: #000;
  filter: blur(12px);
  opacity: 0.12;
  transform-origin: bottom left;
  transform: rotate(-10deg) scale(1.1);
  transition: opacity 1.2s, color 1.2s;
}

.sofa-silhouette {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  height: 120px;
  background: linear-gradient(to top, #242933 30%, #3b4252 100%);
  border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
  box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.15);
  transition: background 1.2s, transform 0.6s var(--transition-bezier);
}

.room-canvas.room-bedroom .sofa-silhouette {
  height: 110px;
  background: linear-gradient(to top, #3b4252 20%, #8892b0 100%);
  width: 75%;
}

.room-canvas.room-office .sofa-silhouette {
  height: 80px;
  width: 90%;
  background: linear-gradient(to top, #1c1c1e 0%, #2c2c2e 100%);
}

.room-canvas.room-staircase .sofa-silhouette {
  width: 120%;
  height: 220px;
  background: linear-gradient(150deg, transparent 40%, #e5e9f0 40%);
  box-shadow: none;
}

/* Room Lighting Mood Styles */
/* 1. Warm Sunset Mood */
.room-canvas.light-sunset {
  filter: saturate(1.15) contrast(0.98);
}
.room-canvas.light-sunset.room-living { background-color: #d1b49e; }
.room-canvas.light-sunset.room-bedroom { background-color: #baa493; }
.room-canvas.light-sunset.room-office { background-color: #5d4d50; }
.room-canvas.light-sunset.room-staircase { background-color: #eed6c5; }

.room-canvas.light-sunset .light-ray-effect {
  background: linear-gradient(135deg, rgba(243, 156, 18, 0.5) 0%, rgba(243, 156, 18, 0) 55%);
}
.room-canvas.light-sunset .flora-shadow-svg {
  color: #4a2711;
  opacity: 0.18;
}

/* 2. Ambient Night Mood */
.room-canvas.light-night {
  filter: brightness(0.6) contrast(1.05);
}
.room-canvas.light-night.room-living { background-color: #1e222b; }
.room-canvas.light-night.room-bedroom { background-color: #1a2221; }
.room-canvas.light-night.room-office { background-color: #151b26; }
.room-canvas.light-night.room-staircase { background-color: #242936; }

.room-canvas.light-night .light-ray-effect {
  background: linear-gradient(135deg, rgba(149, 165, 166, 0.2) 0%, rgba(149, 165, 166, 0) 45%);
}
.room-canvas.light-night .flora-shadow-svg {
  color: #000;
  opacity: 0.25;
}
.room-canvas.light-night .sofa-silhouette {
  background: #0f1115;
}

/* Photo Tile Grid base */
.tile-grid-container {
  position: relative;
  z-index: 5;
  width: 85%;
  max-width: 680px;
  height: 60%;
  display: grid;
  gap: 20px;
  align-content: center;
  justify-content: center;
  padding: 20px;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Dynamic Gallery Cluster Layout classes */
.tile-grid-container.layout-grid {
  grid-template-columns: repeat(3, 1fr);
  max-width: 580px;
}

.tile-grid-container.layout-trio {
  grid-template-columns: repeat(3, 1fr);
  max-width: 500px;
}

.tile-grid-container.layout-staircase {
  grid-template-columns: repeat(4, 1fr);
}
.tile-grid-container.layout-staircase .canvas-tile:nth-child(1) { transform: translateY(-45px); }
.tile-grid-container.layout-staircase .canvas-tile:nth-child(2) { transform: translateY(-15px); }
.tile-grid-container.layout-staircase .canvas-tile:nth-child(3) { transform: translateY(15px); }
.tile-grid-container.layout-staircase .canvas-tile:nth-child(4) { transform: translateY(45px); }

.tile-grid-container.layout-cluster {
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.tile-grid-container.layout-cluster .canvas-tile:nth-child(even) { transform: translateY(-24px) scale(0.95); }
.tile-grid-container.layout-cluster .canvas-tile:nth-child(odd) { transform: translateY(20px) scale(1.02); }

/* 5. Diamond Symmetry */
.tile-grid-container.layout-diamond {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: 400px;
}
.tile-grid-container.layout-diamond .canvas-tile { width: calc(33.333% - 16px); }
.tile-grid-container.layout-diamond .canvas-tile:nth-child(1) { transform: translateY(50%); margin-right: 33.333%; }
.tile-grid-container.layout-diamond .canvas-tile:nth-child(4) { transform: translateY(-50%); margin-left: 33.333%; }

/* 6. Circle / Radial */
.tile-grid-container.layout-circle {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  border-radius: 50%;
  padding: 20px;
  max-width: 450px;
}
.tile-grid-container.layout-circle .canvas-tile { margin: 10px; border-radius: 50%; }

/* 7. ZigZag Path */
.tile-grid-container.layout-zigzag {
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.tile-grid-container.layout-zigzag .canvas-tile:nth-child(even) { transform: translateY(40px); }

/* 8. Heart Shape */
.tile-grid-container.layout-heart {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 500px;
}
.tile-grid-container.layout-heart .canvas-tile { width: 22%; margin: 4px; }
.tile-grid-container.layout-heart .canvas-tile:nth-child(1),
.tile-grid-container.layout-heart .canvas-tile:nth-child(2) { transform: translateY(-20px); }
.tile-grid-container.layout-heart .canvas-tile:nth-child(5) { margin-left: 11%; }

/* 9. Archway */
.tile-grid-container.layout-arch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  height: 300px;
}
.tile-grid-container.layout-arch .canvas-tile { margin: 0 -10px; width: 25%; }
.tile-grid-container.layout-arch .canvas-tile:nth-child(1) { transform: translateY(0); }
.tile-grid-container.layout-arch .canvas-tile:nth-child(2) { transform: translateY(-40px); }
.tile-grid-container.layout-arch .canvas-tile:nth-child(3) { transform: translateY(-60px); }
.tile-grid-container.layout-arch .canvas-tile:nth-child(4) { transform: translateY(-40px); }

/* 10. Random Scatter */
.tile-grid-container.layout-scatter {
  display: block;
  position: relative;
  width: 100%;
  height: 400px;
}
.tile-grid-container.layout-scatter .canvas-tile { position: absolute; width: 25%; }
.tile-grid-container.layout-scatter .canvas-tile:nth-child(1) { top: 10%; left: 10%; transform: rotate(-5deg); }
.tile-grid-container.layout-scatter .canvas-tile:nth-child(2) { top: 40%; left: 30%; transform: rotate(3deg); }
.tile-grid-container.layout-scatter .canvas-tile:nth-child(3) { top: 15%; left: 60%; transform: rotate(-2deg); }
.tile-grid-container.layout-scatter .canvas-tile:nth-child(4) { top: 50%; left: 70%; transform: rotate(6deg); }
.tile-grid-container.layout-scatter .canvas-tile:nth-child(5) { top: 70%; left: 15%; transform: rotate(-4deg); }

/* 11. Manual Freeplay */
.tile-grid-container.layout-manual {
  display: block;
  position: relative;
  width: 100%;
  height: 500px;
}
.tile-grid-container.layout-manual .canvas-tile {
  position: absolute;
  margin: 0;
  width: 150px; /* Default baseline width for absolute mode */
  transform: none;
}
.tile-grid-container.layout-manual .canvas-tile.size-20x20 { width: 140px; }
.tile-grid-container.layout-manual .canvas-tile.size-21x21 { width: 147px; }
.tile-grid-container.layout-manual .canvas-tile.size-21x28 { width: 147px; }
.tile-grid-container.layout-manual .canvas-tile.size-28x21 { width: 196px; }
.tile-grid-container.layout-manual .canvas-tile.size-29x25 { width: 203px; }
.tile-grid-container.layout-manual .canvas-tile.size-30x30 { width: 210px; }
.tile-grid-container.layout-manual .canvas-tile.size-32x32 { width: 224px; }
.tile-grid-container.layout-manual .canvas-tile.size-32x42 { width: 224px; }
.tile-grid-container.layout-manual .canvas-tile.size-42x32 { width: 294px; }
.tile-grid-container.layout-manual .canvas-tile.size-40x40 { width: 280px; }
.tile-grid-container.layout-manual .canvas-tile.size-50x50 { width: 350px; }
.tile-grid-container.layout-manual .canvas-tile.size-50x69 { width: 350px; }
.tile-grid-container.layout-manual .canvas-tile.size-69x50 { width: 483px; }
.tile-grid-container.layout-manual .canvas-tile.size-69x91 { width: 483px; }
.tile-grid-container.layout-manual .canvas-tile.size-91x69 { width: 637px; }
.tile-grid-container.layout-manual .canvas-tile.size-56x112 { width: 392px; }
.tile-grid-container.layout-manual .canvas-tile.size-112x56 { width: 784px; }
.tile-grid-container.layout-manual .canvas-tile:hover {
  transform: scale(1.04) translateZ(12px) !important;
}
.tile-grid-container.layout-manual .canvas-tile.is-manual-dragging {
  z-index: 999;
  cursor: grabbing;
  transform: scale(1.05) !important;
  transition: none !important;
}
/* Staircase layout offsets grid */
.room-canvas.room-staircase .tile-grid-container {
  transform: translateY(-40px) rotate(-15deg);
}

/* Customizable 3D Mat borders */
.canvas-tile {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  cursor: pointer;
  user-select: none;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s;
}
.canvas-tile.size-20x20 { aspect-ratio: 1 / 1; }
.canvas-tile.size-21x21 { aspect-ratio: 1 / 1; }
.canvas-tile.size-21x28 { aspect-ratio: 21 / 28; }
.canvas-tile.size-28x21 { aspect-ratio: 28 / 21; }
.canvas-tile.size-29x25 { aspect-ratio: 29 / 25; }
.canvas-tile.size-30x30 { aspect-ratio: 1 / 1; }
.canvas-tile.size-32x32 { aspect-ratio: 1 / 1; }
.canvas-tile.size-32x42 { aspect-ratio: 32 / 42; }
.canvas-tile.size-42x32 { aspect-ratio: 42 / 32; }
.canvas-tile.size-40x40 { aspect-ratio: 1 / 1; }
.canvas-tile.size-50x50 { aspect-ratio: 1 / 1; }
.canvas-tile.size-50x69 { aspect-ratio: 50 / 69; }
.canvas-tile.size-69x50 { aspect-ratio: 69 / 50; }
.canvas-tile.size-69x91 { aspect-ratio: 69 / 91; }
.canvas-tile.size-91x69 { aspect-ratio: 91 / 69; }
.canvas-tile.size-56x112 { aspect-ratio: 56 / 112; }
.canvas-tile.size-112x56 { aspect-ratio: 112 / 56; }

.canvas-tile:hover {
  transform: scale(1.04) translateZ(12px);
}

.resize-handle {
  position: absolute;
  width: 24px;
  height: 24px;
  background: white;
  border: 2px solid var(--primary);
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}
.resize-handle:hover { transform: scale(1.2); }
.resize-handle.se {
  bottom: -10px;
  right: -10px;
  cursor: se-resize;
}

.canvas-tile.is-dragging {
  cursor: grabbing;
  z-index: 100;
  opacity: 0.85;
  transform: scale(1.08) translateZ(30px);
  pointer-events: none;
}

/* Framed mat borders */
.frame-border {
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.frame-border.classic {
  border: 10px solid #1c1c1e;
  padding: 6px;
  background: #ffffff;
  box-shadow: inset 0 0 2px #000, 0 8px 24px rgba(0, 0, 0, 0.16);
}

.frame-border.classic .frame-mat {
  width: 100%;
  height: 100%;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #e5e5ea;
  overflow: hidden;
  transition: padding 0.4s ease;
}

.frame-border.clean {
  border: 10px solid #f2f2f7;
  padding: 6px;
  background: #ffffff;
  box-shadow: inset 0 0 2px rgba(0,0,0,0.08), 0 8px 20px rgba(0, 0, 0, 0.12);
}

.frame-border.clean .frame-mat {
  width: 100%;
  height: 100%;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #f2f2f7;
  overflow: hidden;
  transition: padding 0.4s ease;
}

.frame-border.bold {
  border: 16px solid #1c1c1e;
  box-shadow: inset 0 0 4px #000, 0 12px 28px rgba(0,0,0,0.2);
}

.frame-border.bold .frame-mat {
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition: padding 0.4s ease;
}

.frame-border.edge {
  border: none;
  border-right: 3px solid #aeaeb2;
  border-bottom: 3px solid #8e8e93;
  border-radius: 2px;
  box-shadow: 6px 10px 20px rgba(0, 0, 0, 0.16);
}

.frame-border.edge .frame-mat {
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition: padding 0.4s ease;
}

.frame-border.ever {
  border: 2px solid #c7c7cc;
  padding: 8px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.frame-border.ever .frame-mat {
  width: 100%;
  height: 100%;
  border: 1px solid #c7c7cc;
  overflow: hidden;
  transition: padding 0.4s ease;
}

/* Class to turn off white border mat (full bleed image) */
.frame-border.no-matting .frame-mat {
  padding: 0 !important;
  border: none !important;
}

.frame-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Individual tile photo positions inside frame viewport (zoom/crop preview) */
.canvas-tile .frame-image {
  transform-origin: center center;
}

.tile-delete-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--danger);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.canvas-tile:hover .tile-delete-btn {
  opacity: 1;
}

.tile-delete-btn:hover {
  transform: scale(1.15);
  background: #cc2424;
}

.tile-duplicate-btn {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.canvas-tile:hover .tile-duplicate-btn {
  opacity: 1;
}

.tile-duplicate-btn:hover {
  transform: scale(1.15);
  background: #000;
}

/* Floating cart bar styles */
.cart-floating-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--border-radius-md);
  padding: 16px 24px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin-top: 10px;
  transition: var(--transition-smooth);
}

.cart-info {
  display: flex;
  flex-direction: column;
}

.tile-count {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--dark);
}

.price-breakdown {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--grey-600);
}
.cart-bonus-text { margin-top: 4px; font-size: 0.75rem; font-weight: 600; color: var(--success); }

.discount-label {
  color: var(--success);
  font-weight: 600;
  margin-left: 6px;
}

.checkout-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 14px rgba(73, 56, 219, 0.2);
}

.checkout-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 18px rgba(73, 56, 219, 0.3);
  transform: translateX(2px);
}

/* Customizer Sidebar tabs */
.control-panel {
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--border-radius-md);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.studio-tab-content {
  display: none;
  animation: fadeInTab 0.3s ease-out;
}

.studio-tab-content.active {
  display: block;
}

@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.control-group {
  margin-bottom: 28px;
}

.control-group:last-child {
  margin-bottom: 0;
}

.control-group-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 8px;
}

.group-info-text {
  font-size: 0.85rem;
  color: var(--grey-600);
  margin-bottom: 24px;
}

.sub-group-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--grey-800);
  margin-bottom: 12px;
}

/* Preset grid layouts */
.preset-gallery-group {
  margin-top: 30px;
  border-top: 1px solid var(--grey-100);
  padding-top: 20px;
}

.preset-gallery-group h5 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: var(--grey-800);
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.preset-item {
  border: 1px solid var(--grey-200);
  border-radius: var(--border-radius-sm);
  padding: 8px;
  background: var(--grey-50);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.preset-item:hover {
  background: var(--white);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.preset-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: var(--shadow-sm);
}

.preset-item span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--grey-800);
}

/* Matting Toggle visual switch */
.mat-toggle-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.mat-toggle-switch input {
  display: none;
}

.slider-toggle-btn {
  width: 44px;
  height: 24px;
  background-color: var(--grey-200);
  border-radius: 24px;
  position: relative;
  transition: background-color 0.3s;
}

.slider-toggle-btn::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s;
}

.mat-toggle-switch input:checked + .slider-toggle-btn {
  background-color: var(--success);
}

.mat-toggle-switch input:checked + .slider-toggle-btn::after {
  transform: translateX(20px);
}

.toggle-label-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--grey-800);
}

/* Room buttons grids */
.room-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.selector-btn {
  background: var(--grey-50);
  border: 1px solid var(--grey-100);
  border-radius: var(--border-radius-sm);
  padding: 14px;
  text-align: center;
  font-weight: 600;
  color: var(--grey-800);
  font-size: 0.9rem;
}

.selector-btn:hover {
  background: var(--grey-100);
}

.selector-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* Ambient Wall Light Mood buttons */
.mood-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mood-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: var(--border-radius-sm);
  padding: 10px 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--grey-800);
}

.mood-btn:hover {
  background: var(--grey-100);
}

.mood-btn.active {
  background: var(--white);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.mood-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.mood-dot.day { background-color: #5bc0de; }
.mood-dot.sunset { background-color: #f0ad4e; }
.mood-dot.night { background-color: #292b2c; }

/* Dynamic Layout Selectors */
.layout-selector-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.layout-btn {
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--grey-800);
}

.layout-btn:hover {
  background: var(--grey-100);
}

.layout-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* Frame list cards */
.frame-style-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.size-selector-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.size-style-item input { display: none; }
.size-card { border: 1px solid var(--grey-200); border-radius: var(--border-radius-sm); padding: 10px; background: var(--grey-50); display: flex; flex-direction: column; }
.size-style-item input:checked + .size-card { border-color: var(--primary); background: var(--primary-light); }
.size-title { font-size: 0.85rem; font-weight: 700; color: var(--dark); }
.size-price { font-size: 0.8rem; font-weight: 600; color: var(--grey-700); }

.frame-style-item input[type="radio"] {
  display: none;
}

.style-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--grey-100);
  background: var(--grey-50);
  cursor: pointer;
  transition: var(--transition-fast);
}

.frame-style-item:hover .style-card {
  background: var(--white);
  border-color: var(--grey-200);
  box-shadow: var(--shadow-sm);
}

.frame-style-item input[type="radio"]:checked + .style-card {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 4px 12px rgba(73, 56, 219, 0.08);
}

.mini-frame {
  width: 44px;
  height: 44px;
  border-radius: 2px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.mini-frame.classic { border: 4px solid #1c1c1e; background: #ffffff; }
.mini-frame.clean { border: 4px solid #f2f2f7; background: #ffffff; }
.mini-frame.bold { border: 6px solid #1c1c1e; background: #bbbbbb; }
.mini-frame.edge { border-right: 2px solid #aeaeb2; border-bottom: 2px solid #8e8e93; background: #cccccc; }
.mini-frame.ever { border: 1px solid #c7c7cc; padding: 2px; background: #ffffff; }

.style-info {
  display: flex;
  flex-direction: column;
}

.style-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark);
}

.style-desc {
  font-size: 0.75rem;
  color: var(--grey-600);
  line-height: 1.3;
  margin-top: 2px;
}

.action-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--dark);
  color: var(--white);
  font-weight: 600;
  padding: 16px;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-sm);
}

.upload-btn:hover {
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(73, 56, 219, 0.15);
}

.rearrange-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--grey-200);
  color: var(--grey-800);
  font-weight: 600;
  padding: 14px;
  border-radius: var(--border-radius-sm);
}

.rearrange-btn:hover {
  background: var(--grey-50);
}

.rearrange-btn.active {
  background: var(--secondary-glow);
  border-color: var(--secondary);
  color: var(--secondary);
}

.panel-tip {
  font-size: 0.75rem;
  color: var(--grey-600);
  line-height: 1.4;
  margin-top: 14px;
}

/* --------------------------------------------------------------------------
   7. Live Draggable Pan & Zoom Editor Overlay
   -------------------------------------------------------------------------- */
.crop-overlay-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 17, 23, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeInCropBack 0.4s var(--transition-bezier);
}

@keyframes fadeInCropBack {
  from { opacity: 0; }
  to { opacity: 1; }
}

.crop-modal-container {
  width: 90%;
  max-width: 520px;
  background: var(--white);
  border-radius: var(--border-radius-md);
  padding: 32px;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.crop-modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.crop-modal-header h3 {
  font-size: 1.5rem;
  color: var(--dark);
  margin-bottom: 6px;
}

.crop-modal-header p {
  font-size: 0.85rem;
  color: var(--grey-600);
  max-width: 380px;
}

.crop-viewport-outer {
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--grey-50);
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-inset);
  margin-bottom: 24px;
}

.crop-frame-emulator {
  width: 240px;
  height: 240px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  overflow: hidden;
  transition: var(--transition-smooth);
}
.crop-frame-emulator.size-20x20 { width: 240px; height: 240px; }
.crop-frame-emulator.size-30x30 { width: 260px; height: 260px; }
.crop-frame-emulator.size-20x30 { width: 180px; height: 260px; }
.crop-frame-emulator.size-30x20 { width: 260px; height: 180px; }

.crop-mat-emulator {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #ffffff;
}

/* Rule of Thirds guidelines */
.crop-thirds-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.thirds-line {
  position: absolute;
  border: 0.5px dashed rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 1px rgba(0,0,0,0.2);
}

.thirds-line.horiz-1 { top: 33.33%; left: 0; width: 100%; }
.thirds-line.horiz-2 { top: 66.66%; left: 0; width: 100%; }
.thirds-line.vert-1 { left: 33.33%; top: 0; height: 100%; }
.thirds-line.vert-2 { left: 66.66%; top: 0; height: 100%; }

/* Panning Image Container box */
.crop-image-pan-box {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: move;
  cursor: grab;
}

.crop-image-pan-box:active {
  cursor: grabbing;
}

.crop-target-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
  user-select: none;
  pointer-events: none;
}

.crop-modal-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.zoom-slider-group {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--grey-600);
  padding: 0 10px;
}

.zoom-slider-group input[type="range"] {
  flex-grow: 1;
  accent-color: var(--primary);
  height: 6px;
  border-radius: 3px;
  background-color: var(--grey-200);
  outline: none;
}

.crop-buttons-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
  width: 100%;
}
.crop-size-select { border: 1px solid var(--grey-200); border-radius: var(--border-radius-sm); padding: 10px 12px; background: var(--white); }

.crop-buttons-row button {
  width: 100%;
  padding: 12px;
}

/* --------------------------------------------------------------------------
   8. Multi-Step Checkout View & 3D Flipping Credit Card (`#/checkout`)
   -------------------------------------------------------------------------- */
.checkout-layout-container {
  padding-top: calc(var(--navbar-height) + 40px);
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
  padding-bottom: 80px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: start;
}

.checkout-form-panel {
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--border-radius-md);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.checkout-progress-header {
  margin-bottom: 30px;
}

.back-to-studio-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grey-600);
  margin-bottom: 12px;
}

.back-to-studio-link:hover {
  color: var(--primary);
  transform: translateX(-2px);
}

.checkout-progress-header h2 {
  font-size: 2.25rem;
  color: var(--dark);
}

.checkout-multi-step-form {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.checkout-step-block {
  border-bottom: 1px solid var(--grey-100);
  padding-bottom: 36px;
}

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

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

.num-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: var(--font-display);
}

.step-block-header h3 {
  font-size: 1.25rem;
  color: var(--dark);
}

.form-inputs-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--grey-800);
}

.form-group input {
  padding: 12px 16px;
  border: 1px solid var(--grey-200);
  background: var(--grey-50);
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  color: var(--dark);
  font-family: inherit;
  transition: var(--transition-fast);
}

.form-group input:focus {
  outline: none;
  background: var(--white);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

/* 3D Flipping Credit Card Visual Simulator */
.card-simulator-viewport {
  perspective: 1000px;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.credit-card-3d-box {
  width: 100%;
  max-width: 350px;
  height: 200px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.credit-card-3d-box.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  padding: 20px;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-display);
  overflow: hidden;
}

.card-front {
  background: linear-gradient(135deg, #1f232b 0%, #3b4252 100%);
  z-index: 2;
  transform: rotateY(0deg);
  border: 1px solid rgba(255,255,255,0.08);
}

/* Metallic specular reflection sheen */
.card-reflection-sheen {
  position: absolute;
  top: 0;
  left: 0;
  width: 180%;
  height: 180%;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 45%, rgba(255,255,255,0.12) 65%, rgba(255,255,255,0) 100%);
  pointer-events: none;
  transform: translate(-30%, -30%);
  z-index: 5;
  transition: transform 0.1s ease;
}

.card-chip {
  width: 40px;
  height: 30px;
  background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
  border-radius: 4px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
  z-index: 2;
}

.card-sim-brand-logo {
  position: absolute;
  top: 20px;
  right: 20px;
  color: rgba(255, 255, 255, 0.8);
  z-index: 2;
}

.card-sim-brand-logo svg {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  transition: opacity 0.3s ease;
}

.card-sim-number {
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  text-align: center;
  margin-top: 10px;
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.card-sim-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.sim-label {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  color: var(--grey-300);
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.sim-val {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.card-back {
  background: linear-gradient(135deg, #1c1c1e 0%, #2c2c2e 100%);
  transform: rotateY(180deg);
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 16px;
}

.card-magnetic-strip {
  width: 100%;
  height: 40px;
  background: #111112;
  margin-top: 10px;
}

.card-sim-signature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  margin-top: 10px;
}

.signature-strip {
  flex-grow: 1;
  height: 32px;
  background: #f2f2f7;
  border-radius: 2px;
  opacity: 0.9;
}

.card-sim-cvc {
  background: #fff;
  color: #111;
  font-weight: 700;
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 2px;
  margin-left: 10px;
  min-width: 44px;
  text-align: center;
}

.card-back-info {
  font-size: 0.55rem;
  color: var(--grey-600);
  text-align: center;
  padding: 0 20px;
  line-height: 1.3;
}

.submit-order-btn {
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  padding: 16px;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 4px 14px rgba(73, 56, 219, 0.2);
  width: 100%;
  font-size: 1.05rem;
  margin-top: 10px;
}

.submit-order-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(73, 56, 219, 0.35);
  transform: translateY(-1px);
}

/* Sidebar billing table */
.checkout-summary-panel {
  background: var(--grey-50);
  border: 1px solid var(--grey-100);
  border-radius: var(--border-radius-md);
  padding: 32px;
  position: sticky;
  top: calc(var(--navbar-height) + 20px);
}

.checkout-summary-panel h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 16px;
  border-bottom: 1px solid var(--grey-200);
  padding-bottom: 12px;
}

.checkout-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 250px;
  overflow-y: auto;
  margin-bottom: 24px;
  padding-right: 8px;
}

.checkout-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkout-item-thumb {
  width: 48px;
  height: 48px;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-sm);
}

.checkout-item-details {
  display: flex;
  flex-direction: column;
}

.checkout-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
}

.checkout-item-desc {
  font-size: 0.75rem;
  color: var(--grey-600);
}

.modal-pricing-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--grey-600);
}

.price-row.green {
  color: var(--success);
  font-weight: 600;
}

.free-text {
  font-weight: 700;
  color: var(--success);
}

.price-row.total {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark);
  font-family: var(--font-display);
}

/* --------------------------------------------------------------------------
   9. Order Success Confirmation View (`#/confirmation`)
   -------------------------------------------------------------------------- */
.confirmation-container {
  padding-top: calc(var(--navbar-height) + 60px);
  max-width: 650px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.success-icon-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--success-light);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.confirmation-title {
  font-size: 2.5rem;
  color: var(--dark);
  margin-bottom: 8px;
}

.confirmation-subtitle {
  font-size: 1.05rem;
  color: var(--grey-600);
  margin-bottom: 40px;
  max-width: 480px;
}

.receipt-card {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--border-radius-md);
  padding: 32px;
  box-shadow: var(--shadow-md);
  margin-bottom: 40px;
}

.receipt-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  text-align: left;
  border-bottom: 1px solid var(--grey-100);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.receipt-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--grey-600);
  font-weight: 600;
  margin-bottom: 4px;
}

.receipt-val {
  font-weight: 700;
  font-size: 1rem;
  color: var(--dark);
}

.receipt-details-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid var(--grey-100);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.receipt-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.confirmation-actions {
  display: flex;
  gap: 16px;
  width: 100%;
}

.confirmation-actions a {
  flex-grow: 1;
}

/* --------------------------------------------------------------------------
   10. Administrative Access Lock Screen Overlay (`#/admin` auth)
   -------------------------------------------------------------------------- */
.admin-auth-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 17, 23, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s var(--transition-bezier);
}

.admin-auth-screen.hidden {
  display: none !important;
}

.admin-auth-card {
  width: 90%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--grey-100);
  border-radius: var(--border-radius-md);
  padding: 40px 32px;
  box-shadow: var(--shadow-xl);
  text-align: center;
}

/* Auth card shake keyframes */
@keyframes shakeCard {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.auth-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  box-shadow: var(--shadow-sm);
}

.admin-auth-card h3 {
  font-size: 1.5rem;
  color: var(--dark);
  margin-bottom: 8px;
}

.admin-auth-card p {
  font-size: 0.85rem;
  color: var(--grey-600);
  margin-bottom: 24px;
}

.auth-passcode-dots {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 30px;
}

.auth-passcode-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--grey-200);
  transition: background-color 0.2s;
}

.auth-passcode-dots .dot.filled {
  background: var(--primary);
  transform: scale(1.15);
}

.auth-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 280px;
  margin: 0 auto 20px auto;
}

.num-key {
  background: var(--grey-50);
  border: 1px solid var(--grey-100);
  border-radius: var(--border-radius-sm);
  padding: 14px;
  font-weight: 700;
  font-size: 1.15rem;
  font-family: var(--font-display);
  color: var(--grey-800);
}

.num-key:hover {
  background: var(--white);
  border-color: var(--grey-200);
  box-shadow: var(--shadow-sm);
}

.num-key:active {
  background: var(--primary-light);
  color: var(--primary);
}

.num-key.btn-clear {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--danger);
  background: var(--danger-light);
}

.num-key.btn-enter {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--success);
  background: var(--success-light);
}

.pin-hint {
  font-size: 0.75rem;
  color: var(--grey-600);
}

/* --------------------------------------------------------------------------
   11. Unlocked Admin Dashboard Panel (`#/admin` dashboard)
   -------------------------------------------------------------------------- */
.admin-dashboard-container {
  padding-top: calc(var(--navbar-height) + 30px);
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
  padding-bottom: 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.admin-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-sidebar-header h3 {
  font-size: 1.75rem;
  color: var(--dark);
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grey-600);
  border: 1px solid var(--grey-200);
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
}

.logout-btn:hover {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger);
}

/* Stats Overview cards */
.admin-stats-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.stat-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--grey-600);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--dark);
}

/* Search and Filters */
.order-queue-controls h4 {
  font-size: 1.15rem;
  color: var(--dark);
  margin-bottom: 12px;
}

.search-input-wrapper input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--grey-200);
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  margin-bottom: 16px;
  background: var(--grey-50);
}

.search-input-wrapper input:focus {
  outline: none;
  background: var(--white);
  border-color: var(--primary);
}

.admin-filter-bar {
  display: flex;
  gap: 8px;
}

.filter-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--border-radius-lg);
  background: var(--grey-50);
  color: var(--grey-800);
  border: 1px solid var(--grey-200);
}

.filter-badge.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* Order List Items */
.admin-orders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 8px;
}

.admin-order-card {
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--border-radius-sm);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-order-card:hover {
  border-color: var(--grey-300);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.admin-order-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 4px 12px rgba(73, 56, 219, 0.08);
}

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

.card-left strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--dark);
}

.card-date {
  font-size: 0.75rem;
  color: var(--grey-600);
}

.card-items-desc {
  font-size: 0.85rem;
  color: var(--grey-800);
}

.card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.card-price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
}

/* Status Badges */
.order-badge-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--border-radius-lg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.order-badge-pill.pending { background: var(--warning-light); color: var(--warning); }
.order-badge-pill.printing { background: var(--primary-light); color: var(--primary); }
.order-badge-pill.shipped { background: var(--success-light); color: var(--success); }
.order-badge-pill.delivered { background: #e5fdf5; color: #1abc9c; }

/* Right Inspector Panel Column */
.admin-inspector {
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--border-radius-md);
  padding: 40px;
  box-shadow: var(--shadow-md);
  min-height: 500px;
  position: sticky;
  top: calc(var(--navbar-height) + 30px);
}

.empty-inspector-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--grey-300);
  height: 400px;
}

.empty-inspector-state p {
  font-size: 0.95rem;
  color: var(--grey-600);
  max-width: 280px;
  margin-top: 16px;
}

.inspector-content-card {
  animation: fadeInInspect 0.4s var(--transition-bezier);
}

@keyframes fadeInInspect {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.inspector-header {
  border-bottom: 1px solid var(--grey-100);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.inspector-header h3 {
  font-size: 1.75rem;
  color: var(--dark);
  margin-top: 8px;
  margin-bottom: 4px;
}

.order-date-label {
  font-size: 0.8rem;
  color: var(--grey-600);
}

.inspector-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.inspector-actions button {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 10px;
  border-radius: var(--border-radius-sm);
  text-align: center;
}

.action-btn-print { background: var(--primary-light); color: var(--primary); }
.action-btn-print:hover { background: var(--primary); color: var(--white); }
.action-btn-ship { background: var(--warning-light); color: var(--warning); }
.action-btn-ship:hover { background: var(--warning); color: var(--white); }
.action-btn-complete { background: var(--success-light); color: var(--success); }
.action-btn-complete:hover { background: var(--success); color: var(--white); }
.action-btn-delete { background: var(--danger-light); color: var(--danger); }
.action-btn-delete:hover { background: var(--danger); color: var(--white); }

.inspector-details-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  border-bottom: 1px solid var(--grey-100);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.inspector-col h5 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--grey-600);
  margin-bottom: 8px;
}

.inspector-col p {
  font-size: 0.9rem;
  color: var(--grey-800);
  line-height: 1.5;
}

.inspector-prints-section h5 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--grey-600);
  margin-bottom: 16px;
}

.inspector-prints-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 6px;
}

.inspector-tile-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.inspector-frame-preview {
  width: 90px;
  height: 90px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.inspector-tile-style {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--grey-600);
}

/* --------------------------------------------------------------------------
   12. How It Works (Scroll-Driven Reveals)
   -------------------------------------------------------------------------- */
.how-it-works { padding: 100px 0; background-color: var(--white); }
.how-it-works-container { max-width: 1100px; margin: 0 auto; padding: 0 32px; }
.scroll-timeline-flow { display: flex; flex-direction: column; gap: 80px; position: relative; margin-top: 60px; }

.step-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
}

.step-info h3 { font-size: 2rem; color: var(--dark); margin-bottom: 16px; }
.step-info p { font-size: 1.05rem; color: var(--grey-600); }
.step-number { font-family: var(--font-display); font-size: 3.5rem; font-weight: 900; color: var(--primary-light); line-height: 1; }

.step-visual {
  position: relative;
  background-color: var(--grey-50);
  border: 1px solid var(--grey-100);
  border-radius: var(--border-radius-md);
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.icon-circle {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--white);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.phone-mockup {
  width: 180px;
  height: 360px;
  background: #1c1c1e;
  border: 8px solid #2c2c2e;
  border-radius: 28px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
  transform: translateY(40px) rotate(-5deg);
  transition: transform 0.6s var(--transition-bezier);
}

.step-card:hover .phone-mockup { transform: translateY(20px) rotate(0deg); }
.phone-screen { width: 100%; height: 100%; background: #000; border-radius: 20px; overflow: hidden; padding: 10px; }
.app-photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; height: 100%; align-content: start; }
.grid-pic { width: 100%; aspect-ratio: 1 / 1; border-radius: 4px; background-size: cover; background-position: center; position: relative; }
.grid-pic.active::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(73, 56, 219, 0.4); border-radius: 4px; }

.check-overlay {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.box-mockup {
  width: 220px;
  height: 140px;
  background: #d7ccc8;
  border-radius: 4px;
  position: relative;
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
  transform: translateY(20px) rotate(5deg);
  transition: transform 0.6s var(--transition-bezier);
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-card:hover .box-mockup { transform: translateY(0) rotate(0deg); }
.box-side.box-front { width: 100%; height: 100%; border: 1px solid #bcaaa4; display: flex; align-items: center; justify-content: center; }
.box-logo { font-family: var(--font-display); font-weight: 800; color: #8d6e63; }
.box-tile-out {
  position: absolute;
  top: -60px;
  width: 110px;
  height: 110px;
  border-radius: 2px;
  background-size: cover;
  box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.2);
  border: 6px solid #1c1c1e;
  animation: boxFloat 3s ease-in-out infinite;
}

.sticky-mockup {
  width: 260px;
  height: 200px;
  background: #f4f3f0;
  border-radius: 4px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wall-stripes { position: absolute; width: 100%; height: 100%; background-image: linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px); background-size: 20px 100%; }
.hanging-tile-demo { width: 120px; height: 120px; background-size: cover; border: 8px solid #ffffff; box-shadow: 4px 8px 20px rgba(0,0,0,0.12); position: relative; transform: rotate(-3deg); transition: transform 0.6s var(--transition-bezier); }
.step-card:hover .hanging-tile-demo { transform: rotate(0deg) scale(1.05); }
.peelable-corner { position: absolute; bottom: 0; right: 0; width: 24px; height: 24px; background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,0.1) 50%, #ffffff 100%); }

/* --------------------------------------------------------------------------
   12.5 FAQ Accordion
   -------------------------------------------------------------------------- */
.faq-section {
  padding: 100px 0;
  background:
    radial-gradient(circle at 5% 10%, rgba(73, 56, 219, 0.08), transparent 42%),
    radial-gradient(circle at 90% 20%, rgba(59, 130, 246, 0.08), transparent 38%),
    linear-gradient(180deg, #fbfcff 0%, #f7f8fc 100%);
}

.faq-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 32px;
}

.faq-accordion-list {
  margin-top: 36px;
  display: grid;
  gap: 14px;
}

.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 18px 35px rgba(27, 35, 63, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}

.faq-item[open] {
  border-color: rgba(73, 56, 219, 0.22);
  box-shadow: 0 22px 40px rgba(27, 35, 63, 0.12);
}

.faq-question {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--dark);
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-arrow {
  flex-shrink: 0;
  color: var(--primary);
  transition: transform 0.28s ease;
}

.faq-item[open] .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 24px 22px;
  color: var(--grey-700);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-answer p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.footer { background: var(--dark); color: var(--white); padding: 80px 0 40px 0; }
.footer-container { max-width: 1300px; margin: 0 auto; padding: 0 32px; display: grid; grid-template-columns: 1.2fr 1.8fr; gap: 80px; margin-bottom: 60px; }
.footer-brand .logo { color: var(--white); margin-bottom: 24px; }
.footer-brand .logo svg { color: var(--white); }
.footer-brand p { color: var(--grey-300); font-size: 0.95rem; line-height: 1.6; max-width: 420px; }
.footer-links-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.footer-col h5 { font-size: 1rem; font-weight: 600; margin-bottom: 20px; color: var(--white); }
.footer-col a { display: block; font-size: 0.9rem; color: var(--grey-300); margin-bottom: 12px; }
.footer-col a:hover { color: var(--white); transform: translateX(2px); }
.footer-bottom { max-width: 1300px; margin: 0 auto; padding: 40px 32px 0 32px; border-top: 1px solid var(--grey-800); display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--grey-600); }

.subpage-drawer-overlay { position: fixed; inset: 0; background: rgba(9, 13, 26, 0.45); opacity: 0; pointer-events: none; transition: opacity 0.25s ease; z-index: 80; }
.subpage-drawer-overlay.open { opacity: 1; pointer-events: auto; }
.subpage-drawer { position: fixed; top: 0; right: 0; width: min(520px, 100vw); height: 100vh; transform: translateX(100%); transition: transform 0.28s ease; z-index: 90; display: flex; flex-direction: column; background: rgba(255, 255, 255, 0.88); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-left: 1px solid rgba(255, 255, 255, 0.5); }
.subpage-drawer.open { transform: translateX(0); }
.subpage-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--grey-100); }
#drawer-close-btn { font-size: 1.5rem; background: transparent; color: var(--dark); }
.subpage-drawer-body { padding: 18px 22px 28px; overflow-y: auto; }
.drawer-view { display: none; }
.drawer-view.active { display: block; }
.drawer-list { margin-left: 18px; line-height: 1.7; }
.drawer-form { display: grid; gap: 8px; }
.drawer-form input, .drawer-form select, .drawer-form textarea { width: 100%; border: 1px solid var(--grey-200); border-radius: var(--border-radius-sm); padding: 10px 12px; background: var(--white); }
.drawer-action-link { margin-top: 8px; display: inline-flex; }
.drawer-feedback { min-height: 20px; font-size: 0.8rem; font-weight: 600; color: var(--success); margin: 0; }

.subpage-shell {
  display: grid;
  gap: 22px;
}
.subpage-lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--grey-700);
  margin: 0;
}
.subpage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.subpage-card {
  border: 1px solid var(--grey-100);
  border-radius: var(--border-radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  display: grid;
  gap: 10px;
}
.subpage-card h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--dark);
}
.subpage-card p {
  margin: 0;
  color: var(--grey-600);
  font-size: 0.9rem;
  line-height: 1.6;
}
.subpage-list {
  display: grid;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--grey-700);
}
.subpage-pricing-table {
  display: grid;
  border: 1px solid var(--grey-100);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background: var(--white);
}
.subpage-pricing-table > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--grey-100);
}
.subpage-pricing-table > div:last-child { border-bottom: none; }
.subpage-pricing-table strong { color: var(--dark); font-family: var(--font-display); }
.subpage-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--success);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   14. Responsive Layout Queries
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-container { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-content { align-items: center; }
  .hero-title { font-size: 3rem; }
  .hero-actions { justify-content: center; }
  
  .workspace-grid, .checkout-layout-container, .admin-dashboard-container {
    grid-template-columns: 1fr;
  }
  
  .canvas-panel, .checkout-summary-panel, .admin-inspector {
    position: static;
  }
  
  .step-card { grid-template-columns: 1fr; gap: 32px; }
  .step-card.reverse { direction: ltr; }
  .step-card.reverse .step-info { order: 2; }
  .step-card.reverse .step-visual { order: 1; }
  .footer-container { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 640px) {
  .nav-links, .nav-btn { display: none; }
  .hero-title { font-size: 2.25rem; }
  .hero-actions { flex-direction: column; width: 100%; }
  .primary-btn, .secondary-btn { width: 100%; }
  .hero-features { flex-direction: column; gap: 16px; }
  
  .room-canvas { height: 380px; }
  .tile-grid-container { gap: 10px; }
  .room-selector-grid { grid-template-columns: 1fr; }
  .footer { padding: 48px 0 24px 0; }
  .footer-container { padding: 0 20px; gap: 32px; margin-bottom: 32px; }
  .footer-brand .logo { margin-bottom: 12px; }
  .footer-brand p { font-size: 0.85rem; line-height: 1.5; }
  .footer-links-grid { grid-template-columns: 1fr 1fr; gap: 24px 20px; }
  .footer-col h5 { font-size: 0.9rem; margin-bottom: 12px; }
  .footer-col a { font-size: 0.82rem; margin-bottom: 8px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 12px; padding: 20px 20px 0 20px; font-size: 0.75rem; }
  .footer-bottom p { display: flex; flex-direction: column-reverse; gap: 8px; margin: 0; }
  .footer-bottom .footer-credit,
  .footer-bottom .footer-tagline { display: block; }
  .footer-bottom .footer-credit { font-weight: 600; color: var(--grey-500); }
  
  .confirmation-actions { flex-direction: column; }
  .admin-stats-summary { grid-template-columns: 1fr; }
  .mood-selector-grid, .layout-selector-list { grid-template-columns: 1fr; }
  .size-selector-grid { grid-template-columns: 1fr; }
  .crop-buttons-row { grid-template-columns: 1fr; }
  .subpage-grid { grid-template-columns: 1fr; }
  .faq-section { padding: 72px 0; }
  .faq-container { padding: 0 20px; }
  .faq-question { padding: 18px 16px; font-size: 0.95rem; }
  .faq-answer { padding: 0 16px 16px; font-size: 0.88rem; }
  .cart-drawer { width: 100%; border-radius: 12px 12px 0 0; }
  .admin-table-container, .supplier-admin-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .subpage-container { padding: calc(var(--navbar-height) + 20px) 16px 40px 16px; }
  .subpage-body-content { padding: 20px; }
  .cart-drawer-item img { width: 40px; height: 40px; }
}

/* --------------------------------------------------------------------------
   16. StickyPix Upgraded Subpages & Validation Error Styles
   -------------------------------------------------------------------------- */
.subpage-container {
  max-width: 900px;
  margin: 0 auto;
  padding: calc(var(--navbar-height) + 40px) 32px 60px 32px;
}

.subpage-body-content {
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--border-radius-md);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.field-error-msg {
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 5px;
  display: block;
  transition: opacity 0.2s ease;
}

.field-error-msg.hidden {
  display: none !important;
}

.form-feedback {
  min-height: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  display: block;
}

.form-feedback.hidden {
  display: none !important;
}

.form-feedback.success {
  background-color: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success);
}

.form-feedback.error {
  background-color: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger);
}

/* Checkout and Receipt aspect ratio previews */
.checkout-item-thumb.size-20x20,
.checkout-item-thumb.size-30x30 {
  width: 48px;
  height: 48px;
}
.checkout-item-thumb.size-20x30 {
  width: 34px;
  height: 48px;
}
.checkout-item-thumb.size-30x20 {
  width: 48px;
  height: 34px;
}

/* Receipt items lists */
.receipt-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dashed var(--grey-200);
}
.receipt-item-preview {
  display: flex;
  align-items: center;
  gap: 16px;
}
.receipt-item-thumb {
  width: 50px;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-sm);
}
.receipt-item-thumb.size-20x20,
.receipt-item-thumb.size-30x30 {
  height: 50px;
  aspect-ratio: 1 / 1;
}
.receipt-item-thumb.size-20x30 {
  width: 35px;
  height: 50px;
  aspect-ratio: 2 / 3;
}
.receipt-item-thumb.size-30x20 {
  width: 50px;
  height: 35px;
  aspect-ratio: 3 / 2;
}
.receipt-item-meta {
  display: flex;
  flex-direction: column;
}
.receipt-item-meta strong {
  font-size: 0.9rem;
  color: var(--dark);
}
.meta-desc {
  font-size: 0.75rem;
  color: var(--grey-600);
}
.receipt-item-price {
  font-weight: 700;
  color: var(--dark);
}

/* Admin aspect ratio preview correction */
.inspector-frame-preview {
  width: 90px;
  height: auto !important;
  aspect-ratio: 1 / 1;
}
.inspector-frame-preview.size-20x20,
.inspector-frame-preview.size-30x30 {
  aspect-ratio: 1 / 1;
}
.inspector-frame-preview.size-20x30 {
  aspect-ratio: 2 / 3;
}
.inspector-frame-preview.size-30x20 {
  aspect-ratio: 3 / 2;
}

/* Cart Drawer Styles */
.cart-drawer {
  position: absolute;
  bottom: 100%;
  right: 0;
  width: 320px;
  background: var(--white);
  border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  z-index: 10;
  border: 1px solid var(--grey-200);
  border-bottom: none;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}
.cart-drawer:not(.hidden) {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.cart-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--grey-100);
}
.cart-drawer-header h5 {
  margin: 0;
  font-size: 1rem;
}
.cart-drawer-items {
  max-height: 300px;
  overflow-y: auto;
  padding: 8px 0;
}
.cart-drawer-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  gap: 12px;
  border-bottom: 1px solid var(--grey-50);
}
.cart-drawer-item img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--grey-200);
}
.cart-drawer-item-details {
  flex: 1;
  font-size: 0.85rem;
  color: var(--grey-700);
}
.cart-drawer-item-actions {
  display: flex;
  gap: 8px;
}
.cart-drawer-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--grey-100);
  background: var(--grey-50);
}
.cart-drawer-footer button {
  width: 100%;
}

/* ==========================================================================
   MOBILE UI/UX OVERHAUL (APP STORE QUALITY)
   ========================================================================== */

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  /* Hide Desktop Nav Elements */
  .nav-links, .nav-btn, .audio-toggle-btn {
    display: none !important;
  }
  
  .navbar {
    padding-bottom: 0;
  }
  
  /* Show Mobile Bottom Navigation */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(64px + env(safe-area-inset-bottom, 20px));
    padding-bottom: env(safe-area-inset-bottom, 20px);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 2000;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
  }
  
  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--grey-600);
    gap: 4px;
    width: 100%;
    height: 100%;
    transition: var(--transition-fast);
  }
  
  .bottom-nav-item span {
    font-size: 0.7rem;
    font-weight: 600;
  }
  
  .bottom-nav-item.active {
    color: var(--primary);
  }
  
  .bottom-nav-item.active svg {
    fill: var(--primary-glow);
  }

  /* Increase Touch Targets */
  button, a.nav-btn, a.primary-btn, a.secondary-btn, select, input {
    min-height: 48px !important;
  }
  
  /* Prevent iOS zoom on inputs */
  input[type="text"], input[type="email"], select, textarea {
    font-size: 16px !important;
  }

  /* Haptics Simulation */
  button:active, a.primary-btn:active, .bottom-nav-item:active {
    transform: scale(0.96) !important;
  }

  /* Bottom Sheets for Modals */
  .crop-overlay-backdrop {
    display: flex;
    align-items: flex-end; /* Align modal to bottom on mobile */
  }

  .crop-modal-container {
    position: relative;
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    max-height: 90vh;
    border-radius: 24px 24px 0 0 !important;
    animation: slideUpSheet 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding-bottom: calc(env(safe-area-inset-bottom, 20px) + 20px);
    margin: 0;
  }
  
  /* Drag Handle for Bottom Sheet */
  .crop-modal-container::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 5px;
    border-radius: 4px;
    background: var(--grey-300);
  }

  @keyframes slideUpSheet {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  
  /* Adjust main container spacing to prevent overlap with bottom nav */
  body, .spa-content {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 20px));
  }
  
  /* Adjust Studio Layout */
  .workspace-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .canvas-panel {
    position: relative;
    top: 0;
  }
}

/* --------------------------------------------------------------------------
   17. Mobile Checkout (`#/checkout`) — tightens padding, stacks split rows,
       scales heading + card simulator for phone viewports.
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .checkout-layout-container {
    padding-top: calc(var(--navbar-height) + 20px);
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 40px;
    gap: 20px;
  }

  .checkout-form-panel {
    padding: 20px 16px;
    border-radius: var(--border-radius-sm);
  }

  .checkout-progress-header {
    margin-bottom: 20px;
  }

  .checkout-progress-header h2 {
    font-size: 1.5rem;
    line-height: 1.25;
  }

  .checkout-multi-step-form {
    gap: 24px;
  }

  .checkout-step-block {
    padding-bottom: 24px;
  }

  .step-block-header {
    margin-bottom: 16px;
    gap: 10px;
  }

  .step-block-header h3 {
    font-size: 1.05rem;
  }

  .form-row.split {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form-group input {
    padding: 14px 14px;
  }

  .card-simulator-viewport {
    margin-bottom: 20px;
  }

  .credit-card-3d-box {
    max-width: 320px;
    height: 180px;
  }

  .card-face {
    padding: 16px;
  }

  .card-sim-number {
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    margin-top: 4px;
  }

  .card-sim-brand-logo {
    top: 14px;
    right: 14px;
  }

  .checkout-summary-panel {
    padding: 20px 16px;
    border-radius: var(--border-radius-sm);
  }

  .checkout-summary-panel h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    padding-bottom: 10px;
  }

  .checkout-items-list {
    max-height: 200px;
    margin-bottom: 16px;
  }

  .price-row {
    font-size: 0.88rem;
  }

  .price-row.total {
    font-size: 1.1rem;
  }

  .submit-order-btn {
    padding: 14px;
    font-size: 1rem;
  }
}

@media (max-width: 380px) {
  .checkout-layout-container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .checkout-form-panel,
  .checkout-summary-panel {
    padding: 16px 12px;
  }

  .credit-card-3d-box {
    max-width: 280px;
    height: 165px;
  }

  .card-sim-number {
    font-size: 0.95rem;
  }

  .sim-val {
    font-size: 0.72rem;
  }
}
