/* ==========================================================================
   7CGI 3D Studio - AVA Recliner Configurator Stylesheet
   Design Language: 7CGI Brand Theme (High-precision technical dark theme,
   Official 7CGI Orange #ff6f00 accent, slim 375px sidebar, refined sleek typography)
   ========================================================================== */

:root {
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Official 7CGI Orange Palette */
  --cgi-orange: #ff6f00;
  --cgi-orange-hover: #ff851a;
  --cgi-orange-subtle: rgba(255, 111, 0, 0.12);
  --cgi-orange-border: rgba(255, 111, 0, 0.4);
  --cgi-orange-glow: 0 0 12px rgba(255, 111, 0, 0.3);

  --bg-black: #0a0a0a;
  --bg-studio: radial-gradient(circle at 48% 52%, #181818 0%, #0d0d0d 65%, #050505 100%);
  --bg-panel: rgba(14, 14, 14, 0.96);
  --bg-panel-solid: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1e1e1e;
  --bg-card-active: rgba(255, 111, 0, 0.08);

  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-active: #ff6f00;

  /* High contrast, razor-sharp readable text */
  --text-white: #ffffff;
  --text-primary: #e2e8f0;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  /* Sleek slightly-softened architectural corners */
  --radius-xs: 2px;
  --radius-sm: 2px;
  --radius-md: 2px;
  --radius-lg: 3px;

  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  background-color: var(--bg-black);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* App Viewport Container - Strictly side-by-side row at all times */
.app-container {
  display: flex;
  flex-direction: row;
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-black);
}

/* ==========================================================================
   Left Side: 3D Studio Canvas & Viewport Controls
   ========================================================================== */
.viewer-section {
  flex: 1 1 0%;
  min-width: 0;
  height: 100%;
  position: relative;
  background: var(--bg-studio);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.viewer-section:fullscreen,
.viewer-section:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  background: var(--bg-studio);
}

/* Floor Shadow Simulation */
.floor-shadow {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: min(540px, 85%);
  height: 70px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 75%);
  filter: blur(12px);
  pointer-events: none;
  z-index: 1;
}

.iframe-container {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Top Floating Bar over 3D Canvas */
.viewer-top-bar {
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

.brand-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: rgba(17, 17, 17, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--cgi-orange);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.brand-logo {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-white);
}

.brand-divider {
  width: 1px;
  height: 12px;
  background: var(--border-medium);
}

.brand-badge {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: var(--cgi-orange);
  border-radius: var(--radius-xs);
  box-shadow: 0 0 6px var(--cgi-orange);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Quick Action Controls in 3D Canvas */
.viewer-controls {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(17, 17, 17, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.tool-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.tool-btn:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.tool-btn.active {
  color: var(--cgi-orange);
  background: var(--cgi-orange-subtle);
  border-color: var(--cgi-orange-border);
}

.tool-btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  transition: transform var(--transition-fast);
}

.tool-btn:hover svg {
  transform: scale(1.1);
}

/* Bottom Dock: Controls (Auto Rotate, Reset) & Interaction Hint */
.viewer-bottom-bar {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 5px 14px 5px 6px;
  background: rgba(17, 17, 17, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.65);
  z-index: 25;
  pointer-events: auto;
  max-width: calc(100% - 32px);
  white-space: nowrap;
}

.bottom-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bottom-bar-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.bottom-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-secondary);
  user-select: none;
}

.bottom-hint-icon {
  color: var(--cgi-orange);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.bottom-hint-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Drawer Backdrop (for mobile slide-over overlay) */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   Permanent Hanging Vertical "CONFIGURE" Tab (Attached to Drawer Edge)
   Always visible, never disappears, moves smoothly with the drawer.
   ========================================================================== */
.drawer-vertical-tab {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateX(-100%) translateY(-50%);
  z-index: 120;
  display: flex !important; /* Always visible hanging on drawer edge */
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 34px;
  box-sizing: border-box;
  background: var(--cgi-orange);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  padding: 14px 4px 16px;
  cursor: pointer;
  box-shadow: -4px 0 20px rgba(255, 111, 0, 0.45), -2px 0 10px rgba(0, 0, 0, 0.7);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, background 0.2s ease;
  outline: none;
  user-select: none;
  animation: tab-glow 3s infinite ease-in-out;
}

.drawer-vertical-tab:hover {
  background: #ff7f1a;
  transform: translateX(calc(-100% - 3px)) translateY(-50%);
  box-shadow: -6px 0 28px rgba(255, 111, 0, 0.65), -2px 0 12px rgba(0, 0, 0, 0.8);
}

.drawer-vertical-tab .tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: var(--radius-xs);
  transition: transform var(--transition-fast);
}

.drawer-vertical-tab .tab-icon svg {
  width: 11px;
  height: 11px;
  fill: #ffffff;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform: rotate(0deg);
}

/* Chevron arrow rotates to point right when drawer is open */
.drawer-vertical-tab.is-open .tab-icon svg {
  transform: rotate(180deg);
}

.drawer-vertical-tab .tab-text {
  font-family: var(--font-heading);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

@keyframes tab-glow {
  0%, 100% {
    box-shadow: -4px 0 18px rgba(255, 111, 0, 0.4), -2px 0 8px rgba(0, 0, 0, 0.6);
  }
  50% {
    box-shadow: -6px 0 28px rgba(255, 111, 0, 0.65), -2px 0 10px rgba(0, 0, 0, 0.7);
  }
}

/* ==========================================================================
   Right Side: 7CGI Configurator Suite Panel (Responsive Slim Panel)
   ========================================================================== */
.config-sidebar {
  --sidebar-w: clamp(285px, 28vw, 365px);
  width: var(--sidebar-w);
  min-width: 0;
  max-width: 375px;
  flex-shrink: 0;
  height: 100%;
  background: var(--bg-panel);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 20;
  box-shadow: -8px 0 35px rgba(0, 0, 0, 0.6);
  transition: width var(--transition-fast), transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), margin-right 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: visible !important;
}

/* Desktop Collapsed Sidebar State - slides off-screen, tab hangs cleanly at screen edge */
.config-sidebar.drawer-collapsed {
  margin-right: calc(-1 * var(--sidebar-w));
}

/* Drawer Top Header Bar */
.drawer-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #111111;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.drawer-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-white);
}

.drawer-badge {
  background: var(--cgi-orange);
  color: #000;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 9px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-white);
  border-color: var(--border-medium);
}

.drawer-close-btn svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

/* Scrollable Container with Comfortable Breathing Room */
.config-scrollable {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

/* Custom Clean Scrollbar */
.config-scrollable::-webkit-scrollbar {
  width: 4px;
}

.config-scrollable::-webkit-scrollbar-track {
  background: transparent;
}

.config-scrollable::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-xs);
}

.config-scrollable::-webkit-scrollbar-thumb:hover {
  background: var(--cgi-orange);
}

/* Product Header */
.product-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.eyebrow-tag {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--cgi-orange);
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.star-icon {
  color: var(--cgi-orange);
  font-size: 12px;
}

.product-title {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-white);
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.price-current {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 600;
  color: var(--text-white);
}

.stock-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}

.product-desc {
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.48;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ==========================================================================
   High-Contrast Customization Modules (3 Main Options)
   ========================================================================== */
.config-module {
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 10px 11px 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition-fast);
}

.config-module:hover,
.config-module.highlighted {
  border-color: rgba(255, 255, 255, 0.22);
}

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 6px;
}

.module-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.module-badge {
  display: none !important;
}

.module-title {
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #ffffff;
}

.module-active-val {
  display: none !important;
}

/* Backrest Architecture Cards (Sleek Geometric Rectangles) */
.backrest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.backrest-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 10px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: var(--transition-fast);
  text-align: left;
  user-select: none;
  outline: none;
}

.backrest-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}

.backrest-card.active {
  background: var(--bg-card-active);
  border-color: var(--border-active);
  box-shadow: var(--cgi-orange-glow);
}

.backrest-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.backrest-icon-box {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.backrest-card.active .backrest-icon-box {
  background: var(--cgi-orange);
  color: #ffffff;
}

.backrest-icon-box svg {
  width: 13px;
  height: 13px;
}

.backrest-check {
  width: 15px;
  height: 15px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.backrest-card.active .backrest-check {
  border-color: var(--cgi-orange);
  background: var(--cgi-orange);
}

.backrest-check svg {
  width: 9px;
  height: 9px;
  fill: #ffffff;
  opacity: 0;
  transition: var(--transition-fast);
}

.backrest-card.active .backrest-check svg {
  opacity: 1;
}

.backrest-name {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-white);
  letter-spacing: 0.25px;
}

.backrest-badge {
  display: none !important;
}

/* Leather Swatches Grid (Crisp Square Tiles) */
.leather-swatch-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.leather-swatch-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 4px 7px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: var(--transition-fast);
  outline: none;
  user-select: none;
  position: relative;
}

.leather-swatch-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}

.leather-swatch-btn.active {
  background: var(--bg-card-active);
  border-color: var(--border-active);
  box-shadow: var(--cgi-orange-glow);
}

/* Swatch Preview Chip */
.swatch-disc {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.leather-swatch-btn.active .swatch-disc {
  border-color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 111, 0, 0.5);
}

.swatch-disc svg {
  width: 12px;
  height: 12px;
  fill: #ffffff;
  opacity: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
  transition: var(--transition-fast);
}

.leather-swatch-btn.active .swatch-disc svg {
  opacity: 1;
}

/* Swatch Color Gradients */
.disc-taupe {
  background: linear-gradient(135deg, #a29a88 0%, #817964 100%);
}

.disc-black {
  background: linear-gradient(135deg, #383838 0%, #151515 100%);
}

.disc-brown {
  background: linear-gradient(135deg, #7c440a 0%, #462500 100%);
}

.swatch-title {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-white);
  text-align: center;
  line-height: 1.25;
  letter-spacing: 0.15px;
}

.swatch-subtitle {
  display: none !important;
}

/* Rubber & Armrest Swatch Row (Geometric Tiles) */
.rubber-swatch-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.rubber-swatch-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
  outline: none;
  user-select: none;
}

.rubber-swatch-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}

.rubber-swatch-btn.active {
  background: var(--bg-card-active);
  border-color: var(--border-active);
  box-shadow: var(--cgi-orange-glow);
}

.rubber-disc {
  width: 27px;
  height: 27px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  transition: var(--transition-fast);
}

.rubber-swatch-btn.active .rubber-disc {
  border-color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 111, 0, 0.5);
}

.rubber-disc svg {
  width: 10px;
  height: 10px;
  fill: #ffffff;
  opacity: 0;
  transition: var(--transition-fast);
}

.rubber-swatch-btn.active .rubber-disc svg {
  opacity: 1;
}

.rubber-disc-dark {
  background-color: #2E2E2E;
}

.rubber-disc-info {
  background-color: #556566;
}

.rubber-disc-secondary {
  background-color: #8C9095;
}

.rubber-disc-danger {
  background-color: #929577;
}

.rubber-name {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
}

.rubber-swatch-btn.active .rubber-name {
  color: var(--text-white);
  font-weight: 600;
}

/* Feature Highlights Box */
.features-box {
  background: #141414;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.features-box-title {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.4;
}

.feature-bullet {
  color: var(--cgi-orange);
  font-size: 11px;
  flex-shrink: 0;
}

/* ==========================================================================
   Sidebar Sticky Footer / Purchase Actions
   ========================================================================== */
.config-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 12px 18px;
  background: var(--bg-panel-solid);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.btn-primary-action {
  width: 100%;
  padding: 12px 18px;
  background: var(--cgi-orange);
  color: #ffffff;
  border: 1px solid var(--cgi-orange);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
  box-shadow: 0 4px 12px rgba(255, 111, 0, 0.35);
}

.btn-primary-action:hover {
  background: var(--cgi-orange-hover);
  border-color: var(--cgi-orange-hover);
  box-shadow: 0 6px 18px rgba(255, 111, 0, 0.5);
  transform: translateY(-1px);
}

.btn-secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-secondary-action {
  padding: 8px 12px;
  background: #171717;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-secondary-action:hover {
  color: var(--text-white);
  border-color: var(--border-medium);
  background: #1f1f1f;
}

/* ==========================================================================
   Toast Notification & Modal (7CGI Editorial Style)
   ========================================================================== */
.toast-notice {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #141414;
  border: 1px solid var(--border-medium);
  border-left: 3px solid var(--cgi-orange);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  z-index: 9999;
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  pointer-events: none;
}

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

/* Modal Overlay & Box */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #141414;
  border: 1px solid var(--border-medium);
  border-top: 3px solid var(--cgi-orange);
  border-radius: var(--radius-sm);
  max-width: 480px;
  width: 100%;
  padding: 26px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  transform: scale(0.97);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-box {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
}

.modal-close-btn:hover {
  color: var(--text-white);
}

/* ==========================================================================
   Responsive Adaptations (Always Strict Side-by-Side Row Layout)
   Under no circumstances do menus wrap or drop below the 3D viewer.
   ========================================================================== */
@media (max-width: 1100px) {
  .config-sidebar {
    width: clamp(280px, 34vw, 345px);
    min-width: 270px;
  }

  .config-scrollable {
    padding: 12px 14px 10px;
    gap: 9px;
  }

  .product-header {
    padding-bottom: 8px;
  }

  .eyebrow-tag {
    font-size: 10px;
  }

  .product-title {
    font-size: 19px;
    margin-bottom: 4px;
  }

  .price-row {
    margin-bottom: 4px;
  }

  .price-current {
    font-size: 17px;
  }

  .product-desc {
    font-size: 11px;
    line-height: 1.42;
  }

  .config-module {
    padding: 9px 10px 10px;
    gap: 7px;
  }

  .module-header {
    padding-bottom: 6px;
  }

  .module-badge {
    font-size: 9px;
    padding: 2px 5px;
  }

  .module-title {
    font-size: 11.5px;
  }

  .module-active-val {
    font-size: 10.5px;
    padding: 1px 6px;
  }

  .backrest-grid {
    gap: 7px;
  }

  .backrest-card {
    padding: 9px 8px;
    gap: 5px;
  }

  .backrest-name {
    font-size: 10.5px;
  }

  .backrest-badge {
    display: none !important;
  }

  .leather-swatch-list {
    gap: 6px;
  }

  .leather-swatch-btn {
    padding: 7px 4px;
    gap: 5px;
  }

  .swatch-disc {
    width: 28px;
    height: 28px;
  }

  .swatch-title {
    font-size: 9.5px;
  }

  .swatch-subtitle {
    display: none !important;
  }

  .rubber-swatch-row {
    gap: 5px;
  }

  .rubber-swatch-btn {
    padding: 7px 3px;
    gap: 4px;
  }

  .rubber-disc {
    width: 23px;
    height: 23px;
  }

  .rubber-name {
    font-size: 9.5px;
  }

  .config-footer {
    padding: 10px 14px;
    gap: 6px;
  }

  .btn-primary-action {
    font-size: 12px;
    padding: 10px 12px;
  }

  .btn-secondary-action {
    font-size: 11px;
    padding: 7px 8px;
  }

  .viewer-top-bar {
    top: 12px;
    left: 12px;
    right: 12px;
    gap: 6px;
  }

  .brand-pill {
    padding: 5px 9px;
    font-size: 11px;
  }

  .brand-title {
    font-size: 11px;
  }

  .brand-tag {
    font-size: 8px;
  }

  .tool-btn {
    width: 30px;
    height: 30px;
    padding: 0;
  }

  .tool-btn svg {
    width: 16px;
    height: 16px;
  }

  .viewer-bottom-bar {
    bottom: 12px;
    gap: 8px;
    padding: 4px 12px 4px 5px;
    max-width: calc(100% - 24px);
  }
}

@media (max-width: 768px) {
  .config-sidebar {
    width: clamp(250px, 42vw, 290px);
    min-width: 240px;
  }

  .config-scrollable {
    padding: 10px 8px 8px;
    gap: 7px;
  }

  .product-title {
    font-size: 16.5px;
  }

  .price-current {
    font-size: 15.5px;
  }

  .product-desc {
    font-size: 10px;
    line-height: 1.35;
  }

  .config-module {
    padding: 8px 7px 8px;
    gap: 5px;
  }

  .module-title {
    font-size: 10.5px;
    letter-spacing: 0.4px;
  }

  .module-active-val {
    font-size: 9.5px;
  }

  .backrest-card {
    padding: 7px 6px;
    gap: 4px;
  }

  .backrest-icon-box {
    width: 20px;
    height: 20px;
  }

  .backrest-check {
    width: 14px;
    height: 14px;
  }

  .backrest-name {
    font-size: 10px;
  }

  .backrest-badge {
    display: none !important;
  }

  .leather-swatch-list {
    gap: 4px;
  }

  .leather-swatch-btn {
    padding: 6px 2px;
    gap: 4px;
  }

  .swatch-disc {
    width: 24px;
    height: 24px;
  }

  .swatch-title {
    font-size: 9px;
  }

  .swatch-subtitle {
    display: none !important;
  }

  .rubber-swatch-row {
    gap: 4px;
  }

  .rubber-swatch-btn {
    padding: 6px 2px;
    gap: 3px;
  }

  .rubber-disc {
    width: 19px;
    height: 19px;
  }

  .rubber-name {
    font-size: 8.5px;
  }

  .config-footer {
    padding: 8px 10px;
    gap: 5px;
  }

  .btn-primary-action {
    font-size: 11px;
    padding: 9px 8px;
  }

  .btn-secondary-action {
    font-size: 9.5px;
    padding: 6px 4px;
  }

  .tool-btn {
    width: 30px;
    height: 30px;
    padding: 0;
  }

  .brand-pill {
    padding: 4px 7px;
  }

  .brand-tag {
    display: none;
  }

  .viewer-bottom-bar {
    bottom: 12px;
    padding: 4px 8px 4px 4px;
    gap: 6px;
  }
}

/* ==========================================================================
   Mobile / Small Embed Drawer Adaptation (<= 600px)
   The 3D model takes 100% full width.
   Sidebar is hidden inside right edge by default, opening as an overlay drawer.
   ========================================================================== */
@media (max-width: 600px) {
  .app-container {
    overflow: hidden;
    position: relative;
  }

  /* 3D Viewer takes 100% full width */
  .viewer-section {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
  }

  /* Sidebar becomes floating slide-over drawer */
  .config-sidebar {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    width: min(320px, calc(100% - 44px)) !important;
    max-width: calc(100% - 44px) !important;
    min-width: 0 !important;
    margin-right: 0 !important;
    z-index: 100 !important;
    box-shadow: -10px 0 45px rgba(0, 0, 0, 0.9) !important;
    border-left: 1px solid var(--border-medium) !important;
    transform: translateX(100%) !important; /* Closed inside by default on mobile */
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow: visible !important;
  }

  /* When drawer is open on mobile */
  .config-sidebar.drawer-open {
    transform: translateX(0) !important;
  }

  /* Vertical Edge "CONFIGURE" Tab: ALWAYS VISIBLE, NEVER DISAPPEARS */
  .drawer-vertical-tab {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  /* Keep floor shadow nicely proportioned */
  .floor-shadow {
    bottom: 15%;
    width: min(420px, 80%);
    height: 55px;
  }

  /* Bottom Dock on mobile */
  .viewer-bottom-bar {
    bottom: 12px;
    gap: 8px;
    padding: 4px 10px 4px 5px;
    max-width: calc(100% - 24px);
  }

  .tool-btn {
    width: 30px;
    height: 30px;
    padding: 0;
  }

  .tool-btn svg {
    width: 16px;
    height: 16px;
  }

  .bottom-hint {
    font-size: 9.5px;
    gap: 5px;
  }
}

/* Very narrow embeds (< 460px): Hide hint text, keep Auto Rotate, Reset and Fullscreen clean */
@media (max-width: 460px) {
  .bottom-bar-divider,
  .bottom-hint {
    display: none !important;
  }

  .viewer-bottom-bar {
    padding: 4px 6px !important;
  }
}
