:root {
  /* Default: Premium Light Theme */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent-color: #10b981;
  /* Quotico Green */
  --accent-rgb: 16, 185, 129;
  --accent-color-hover: #059669;
  --accent-glow: rgba(var(--accent-rgb), 0.2);

  --border-color: #e2e8f0;
  --border-selected: var(--accent-color);

  --header-bg: rgba(248, 250, 252, 0.8);
  --sidebar-bg: #f1f5f9;

  --font-main: 'Inter', system-ui, -apple-system, sans-serif;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 15px var(--accent-glow);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --transition-fast: 0.1s ease-out;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --header-height: 60px;
  --nav-height: 72px;
}

[data-theme="dark"] {
  /* Retailer Embed: Premium Dark Theme */
  --bg-main: #0B0E14;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.08);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-color: #008064;
  --accent-rgb: 0, 128, 100;
  --accent-color-hover: #006450;
  --accent-glow: rgba(var(--accent-rgb), 0.4);

  --border-color: rgba(255, 255, 255, 0.1);
  --border-selected: var(--accent-color);

  --header-bg: rgba(11, 14, 20, 0.8);
  --sidebar-bg: #11151c;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100vh;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  /* Better for embeds than 100vh */
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  user-select: none;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Fix for Material Symbols Ligature Issues */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded', sans-serif !important;
  font-weight: normal !important;
  font-style: normal !important;
  font-variant-ligatures: normal !important;
  -webkit-font-feature-settings: 'liga' !important;
  font-feature-settings: 'liga' !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  white-space: nowrap !important;
  word-wrap: normal !important;
  direction: ltr !important;
}

.configurator-embed-root {
  container-type: inline-size;
  container-name: configurator;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  width: 100%;
  min-height: 100%;
}

/* Typography elements */
h1,
h2,
h3,
h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-secondary);
}

a {
  text-decoration: none;
  color: var(--text-primary);
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-color);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}



/* =============================================
   CONTINUOUS STEP PROGRESS BAR
   ============================================= */
.step-progress-bar {
  display: block;
  background: var(--bg-main);
  position: sticky;
  top: var(--header-height);
  z-index: 99;
  height: 5px;
  width: 100%;
  flex-shrink: 0;
}

.step-progress-track {
  display: block;
  width: 100%;
  height: 100%;
  background: rgba(var(--accent-rgb), 0.1);
  position: relative;
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--accent-color);
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 4px 4px 0;
}

.step-separator:first-child {
  margin-top: 0 !important;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
}

/* Layout Container */
.configurator-container {
  display: grid;
  grid-template-columns: 1fr 350px;
  flex-grow: 1;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.configurator-container.landing-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  position: relative;
  overflow-x: clip;
  grid-template-columns: 1fr;
}

.configurator-container.landing-mode::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, 100%);
  height: 600px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.05) 0%, rgba(var(--accent-rgb), 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.configurator-container.landing-mode .configurator-main {
  z-index: 1;
}

.configurator-container.landing-mode .configurator-main {
  width: 100%;
  max-width: 1200px;
  padding: 4rem 2rem;
  margin: 0 auto;
}

.hero-header {
  text-align: center;
  margin-bottom: 4rem;
  margin-top: 4rem;
  animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroFadeUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-header h2 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-color));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-header p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

@container configurator (max-width: 992px) {
  .configurator-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  #default-landing-page iframe {
    aspect-ratio: 1 / 1.586 !important;
  }
}

/* Main Configuration Content */
.configurator-main {
  padding: 2rem 2rem 0 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: clip;
}

@media (max-width: 768px) {
  .configurator-main {
    padding: 1.5rem 1rem 0 1rem !important;
  }
}

@media (max-width: 480px) {
  .configurator-main {
    padding: 1rem 0.75rem 0 0.75rem !important;
  }
}

#global-promo-banner,
.step-container {
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.step-container {
  flex-grow: 1;
}

/* Directional slide transitions */
.step-container.slide-in-right {
  animation: slideInRight 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.step-container.slide-in-left {
  animation: slideInLeft 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }

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

.step-container .step-header {
  margin-bottom: 2.5rem;
}

/* Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* Better responsive grid for tablets */
@container configurator (max-width: 992px) {
  .options-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .option-card {
    flex-direction: row !important;
  }

  .option-card .card-image {
    width: 100px;
    height: 100px;
    margin: 8px;
    border-radius: var(--radius-sm);
    flex-grow: 0;
    border-bottom: none;
  }

  .option-card:not(.no-image) .option-tag {
    top: 20px;
    left: 135px;
    font-size: 0.65rem;
    padding: 3px 6px;
    max-width: calc(100% - 150px);
  }

  .option-card:has(.option-tag) .card-content {
    padding-top: 3.6rem;
  }

  .option-card.no-image {
    min-height: auto;
  }
}

/* Mobile responsive grid (1 column) */
@container configurator (max-width: 580px) {
  .options-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .option-card:not(.no-image) .option-tag {
    left: 129px;
  }
}

/* Option Cards */
.option-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
  animation: heroFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.option-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent-color);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  pointer-events: none;
  max-width: calc(100% - 46px);
  /* account for right checkmark area */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Gate hover effects behind hover capability */
@media (hover: hover) {
  .option-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    border-color: rgba(var(--accent-rgb), 0.4);
    box-shadow: var(--shadow-md);
  }
}

/* Touch tap feedback */
.option-card:active {
  transform: scale(0.97);
  transition-duration: 0.08s;
}

.option-card.selected {
  border-color: var(--accent-color);
  background: rgba(var(--accent-rgb), 0.05);
  box-shadow: 0 0 0 1px var(--accent-color), 0 8px 24px var(--accent-glow);
}

/* Animated checkmark badge */
.option-card .card-check {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent-color);
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.option-card .card-check svg {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
}

.option-card.selected .card-check {
  opacity: 1;
  transform: scale(1);
}

.option-card.selected .card-check svg {
  animation: checkDraw 0.35s 0.15s ease-out forwards;
}

@keyframes checkDraw {
  to {
    stroke-dashoffset: 0;
  }
}

/* Ripple effect on tap */
.option-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(var(--accent-rgb), 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.option-card.ripple::after {
  opacity: 1;
}

.card-image {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
  background: var(--sidebar-bg);
}

.option-card.no-image {
  justify-content: center;
  min-height: 120px;
}

.option-card.no-image:has(.option-tag) .card-content {
  padding-top: 3.5rem;
}

.option-card.no-image .card-image {
  display: none;
}

.card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

@container configurator (max-width: 580px) {
  .card-content {
    padding: 0.875rem;
  }
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-desc {
  font-size: 0.875rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.card-price {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-color);
}

/* Product Groups Grid */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.groups-grid.hero-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.group-card {
  background: rgba(var(--bg-card), 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(var(--accent-rgb), 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-md), 0 0 0 1px inset rgba(255, 255, 255, 0.1);
  height: 100%;
  opacity: 0;
  animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (hover: hover) {
  .group-card:hover {
    background: var(--bg-card);
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(var(--accent-rgb), 0.4);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.1), 0 0 30px -5px var(--accent-glow);
  }
}

.group-card:active {
  transform: scale(0.98);
  transition-duration: 0.08s;
}

.card-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.05);
}

.card-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-card) 0%, transparent 40%);
  opacity: 0.8;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

@media (hover: hover) {
  .group-card:hover .card-image-overlay {
    opacity: 0.4;
  }
}

.group-card .card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--sidebar-bg);
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

@media (hover: hover) {
  .group-card:hover .card-image {
    transform: scale(1.08);
  }
}

.group-card .card-content {
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  text-align: left;
  position: relative;
  z-index: 2;
}

.group-card .card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

@media (hover: hover) {
  .group-card:hover .card-title {
    color: var(--accent-color);
  }
}

.group-card .card-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex-grow: 1;
}

.group-card-action-wrapper {
  margin-top: 1.5rem;
}

.group-card .btn-primary .material-symbols-rounded {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) {
  .group-card:hover .btn-primary {
    opacity: 0.9;
    transform: translateY(-2px);
  }

  .group-card:hover .btn-primary .material-symbols-rounded {
    transform: translateX(4px);
  }
}

@container configurator (max-width: 600px) {
  .groups-grid.hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .group-card .card-content {
    padding: 1.5rem;
  }
}


/* Buttons */
.navigation-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem 2rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  margin-left: -2rem;
  margin-right: -2rem;
  border-top: 1px solid var(--border-color);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  position: sticky;
  bottom: 0;
  z-index: 50;
}

@container configurator (max-width: 768px) {
  .navigation-buttons {
    padding: 0.75rem 1rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    margin-left: -1rem;
    margin-right: -1rem;
  }
}

@container configurator (max-width: 480px) {
  .navigation-buttons {
    padding: 0.625rem 0.75rem;
    padding-bottom: calc(0.625rem + env(safe-area-inset-bottom, 0px));
    margin-left: -0.75rem;
    margin-right: -0.75rem;
  }
}

.btn {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  height: 48px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  font-family: var(--font-main);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

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

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-main);
}

@media (hover: hover) {
  .btn-primary:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-2px);
  }
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
}

@media (hover: hover) {
  .btn-secondary:hover:not(:disabled) {
    background: var(--bg-card-hover);
  }
}

.btn-accent {
  background: var(--accent-color);
  color: white;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.3);
}

@media (hover: hover) {
  .btn-accent:hover:not(:disabled) {
    background: var(--accent-color-hover);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.5);
    transform: translateY(-2px);
  }
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
  transition-duration: 0.05s;
}

/* Navigation button sizing on mobile */
.navigation-buttons .btn {
  flex: 1;
  min-height: 52px;
  font-size: 1rem;
}

@container configurator (min-width: 768px) {
  .navigation-buttons .btn {
    flex: none;
    min-height: 48px;
  }
}

.btn-full {
  width: 100%;
}

.hidden {
  display: none !important;
}

/* Sidebar styling */
.sidebar-summary {
  background: var(--sidebar-bg);
  border-left: 1px solid var(--border-color);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: calc(var(--header-height) + 5px);
  height: calc(100vh - var(--header-height) - 6px);
  overflow: hidden;
}

@container configurator (max-width: 992px) {
  .sidebar-summary {
    display: none !important;
  }
}

.sidebar-summary h3 {
  font-size: 1.25rem;
  /*margin-bottom: 2rem;*/
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.summary-items {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.5rem;
  scrollbar-width: thin;
  padding-bottom: 1rem;
  padding-top: 1rem;
  scroll-behavior: smooth;
}

.summary-item {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.summary-item.animate-slide-in {
  animation: slideIn var(--transition-fast);
}

.summary-item-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.summary-item-value {
  display: flex;
  align-items: center;
  font-size: 0.9375rem;
  font-weight: 500;
  gap: 10px;
  min-width: 0;
}

.summary-item-value>span:first-of-type {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-item-price {
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
}

.summary-item-thumb {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
  background: var(--sidebar-bg);
}

.empty-summary {
  font-size: 0.875rem;
  font-style: italic;
  opacity: 0.6;
}

/* Clickable sidebar summary items */
.summary-item-clickable {
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.summary-item-clickable:hover {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.04);
  transform: translateX(2px);
}

.summary-item-step-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.summary-total {
  /*margin-top: 2rem;*/
  margin-bottom: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.total-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.total-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.price-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Custom PDF Viewer Modal --- */
.pdf-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  overscroll-behavior: none;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.pdf-modal.active {
  opacity: 1;
  pointer-events: all;
}

.pdf-toolbar {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-main);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  border-radius: 40px;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--text-main);
  z-index: 10000;
}

.pdf-toolbar-divider {
  width: 1px;
  height: 24px;
  background: var(--border-color);
}

.pdf-toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 580px) {

  .pdf-toolbar-group:first-child,
  .pdf-toolbar-group:first-child+.pdf-toolbar-divider {
    display: none !important;
  }
}

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent-color);
}

.btn-icon.danger:hover {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.pdf-canvas-wrapper {
  width: 100%;
  height: 100%;
  overflow: auto;
  overscroll-behavior: none;
  padding: 2rem;
  padding-bottom: 6rem;
  position: relative;
  scrollbar-width: thin;
  cursor: grab;
  user-select: none;
  display: block;
}

.pdf-canvas-wrapper.grabbing {
  cursor: grabbing !important;
}

.pdf-page-container {
  background: #fff;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  margin: 0 auto 1.5rem auto;
  flex-shrink: 0;
}

.pdf-page-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }

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

.final-summary-list>div:last-child {
  border-bottom: none !important;
}

/* --- Final Summary Page (after last step) --- */
.final-summary-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
}

.final-summary-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.final-summary-check-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  animation: checkPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes checkPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }

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

.final-summary-hero h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0;
}

.final-summary-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.6;
}

.final-summary-price-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 420px;
  padding: 1.25rem 1.5rem;
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px solid rgba(var(--accent-rgb), 0.15);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

.final-summary-price-label {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-secondary);
}

.final-summary-price-value {
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--accent-color);
  letter-spacing: -0.02em;
}

.final-summary-page .final-summary-actions {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 700px;
  align-items: center;
  gap: 1rem;
}

/* --- Summary Mode: Swap sidebar/content on small screens --- */

/* On small screens in summary mode, show the sidebar */
@container configurator (max-width: 992px) {
  .configurator-container.summary-mode {
    grid-template-columns: 1fr;
  }

  /* Hide the main content area (hero message) on small screens, show sidebar instead */
  .configurator-container.summary-mode .configurator-main {
    display: none !important;
  }

  /* Override the default hide on sidebar for summary mode */
  .configurator-container.summary-mode .sidebar-summary {
    display: flex !important;
    position: relative;
    top: 0;
    height: auto;
    min-height: calc(100vh - 60px);
    border-left: none;
    border-top: 1px solid var(--border-color);
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  }
}

@container configurator (max-width: 768px) {
  .final-summary-actions {
    flex-direction: column !important;
  }

  .final-summary-actions>div {
    margin-left: 0 !important;
    width: 100%;
    flex-direction: column !important;
  }

  .final-summary-actions .btn {
    width: 100%;
  }
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: var(--text-secondary);
}

/* --- Quote Preview Styles --- */

.quote-pdf-content {
  padding: 2.5rem;
}

@media (max-width: 768px) {
  .quote-pdf-content {
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  .quote-pdf-content {
    padding: 0.75rem;
  }

  .quote-card-header,
  .quote-card-footer {
    padding: 0.75rem 1rem;
  }

  .quote-spec-value {
    padding: 0.6rem 1rem;
  }

  .quote-totals-card {
    padding: 1.25rem 1.25rem;
  }
}

/* Empty state */
.quote-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  text-align: center;
}

.quote-empty-state p {
  font-size: 1rem;
  font-style: italic;
  opacity: 0.7;
}

/* Product Card */
.quote-product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.quote-product-card:hover {
  box-shadow: var(--shadow-md);
}

.quote-product-card:last-child {
  margin-bottom: 0;
}

/* Card Header */
.quote-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border-color);
}

.contact-check-badge {
  color: var(--accent-color);
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.quote-card-title-block {
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.quote-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}



/* Spec Table */
.quote-card-body {
  padding: 0;
}

.quote-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.quote-spec-row td {
  vertical-align: top;
  border-bottom: 1px solid var(--border-color);
}

.quote-spec-row:last-child td {
  border-bottom: none;
}

.quote-spec-row:nth-child(even) {
  background: rgba(var(--accent-rgb), 0.02);
}

.quote-spec-value {
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 1.5rem;
}

.quote-spec-step {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.1rem;
}

.quote-spec-desc {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* Card Footer */
.quote-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--sidebar-bg);
  gap: 1rem;
  flex-wrap: wrap;
}

.quote-card-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quote-card-pricing {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
}

.quote-card-unit-price {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.quote-card-line-total {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

/* Keep legacy for backward compat but hidden */
.quote-item-row {
  display: none;
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  overflow: hidden;
}

.btn-qty {
  background: transparent;
  border: none;
  padding: 0.7rem 1rem;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1rem;
  transition: background 0.2s;
}

.btn-qty:hover {
  background: var(--bg-card-hover);
}

.qty-value {
  padding: 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  min-width: 32px;
  text-align: center;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

.btn-delete-item {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: none;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-delete-item:hover {
  background: rgba(220, 53, 69, 0.2);
}

/* --- Quote Totals Card --- */
.quote-totals-card {
  margin-top: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  max-width: 380px;
  margin-left: auto;
  box-shadow: var(--shadow-sm);
}

.quote-totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.quote-totals-amount {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.quote-totals-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.75rem 0;
}

.quote-totals-grand {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 0.25rem;
}

.quote-totals-grand>span:first-child {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.quote-totals-grand-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-color);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* --- Discount Calculator --- */
.discount-section {
  padding: 0.75rem;
  margin: 0.5rem 0;
  background: rgba(var(--accent-rgb), 0.05);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--accent-color);
}

.discount-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.discount-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-color);
  cursor: pointer;
  white-space: nowrap;
}

.discount-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 100px;
}

.discount-input-wrapper input {
  width: 100%;
  padding: 0.4rem 1.75rem 0.4rem 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: right;
  transition: all 0.2s ease;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}

.discount-input-wrapper input::-webkit-outer-spin-button,
.discount-input-wrapper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.discount-input-wrapper input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

.discount-input-suffix {
  position: absolute;
  right: 0.6rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}

.discount-amount-row,
.discount-net-row {
  margin-top: 0.35rem;
  font-size: 0.875rem !important;
}

.discount-negative {
  color: #dc3545;
  font-weight: 600;
}

.discount-net-row .quote-totals-amount {
  font-weight: 700;
  color: var(--accent-color);
}

/* --- Custom Dialogs --- */
.custom-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.custom-dialog-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.custom-dialog-box {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2rem 1rem 1rem 1rem;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.custom-dialog-box.active {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.custom-dialog-message {
  font-size: 1rem;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.5;
  font-weight: 500;
}

.custom-dialog-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.custom-dialog-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2);
}

.custom-dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.custom-dialog-btn {
  flex: 1;
}

/* --- Toast Notification --- */
.quote-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 3rem));
  z-index: 10001;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  max-width: 420px;
  width: calc(100% - 2rem);
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s ease;
}

.quote-toast.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.quote-toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent-color);
  flex-shrink: 0;
}

.quote-toast-icon svg {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
}

.quote-toast.active .quote-toast-icon svg {
  animation: toastCheckDraw 0.4s 0.3s ease-out forwards;
}

@keyframes toastCheckDraw {
  to {
    stroke-dashoffset: 0;
  }
}

.quote-toast-body {
  flex: 1;
  min-width: 0;
}

.quote-toast-message {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.quote-toast-sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.quote-toast-action {
  flex-shrink: 0;
  white-space: nowrap;
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.8125rem;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.3);
}

.quote-toast-action:hover {
  background: var(--accent-color-hover);
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.5);
  transform: translateY(-2px);
}

.quote-toast-dismiss {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  line-height: 0;
  transition: color 0.2s;
}

.quote-toast-dismiss:hover {
  color: var(--text-primary);
}

/* Progress bar on toast */
.quote-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--accent-color);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  transition: width linear;
}

/* --- Floating Cart Badge --- */
.floating-cart-badge {
  position: fixed;
  top: 5.5rem;
  left: 50%;
  white-space: nowrap;
  transform: translateX(-50%);
  z-index: 9998;
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: var(--text-primary);
  color: var(--bg-main);
  padding: 0.7rem 1.1rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.875rem;
  font-family: var(--font-main);
  cursor: pointer;
  border: none;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: floatBadgeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes floatBadgeIn {
  from {
    transform: translateX(-50%) scale(0) translateY(20px);
    opacity: 0;
  }

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

.floating-cart-badge:hover {
  transform: translateX(-50%) translateY(-3px) scale(1.03);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

.floating-cart-badge:active {
  transform: translateX(-50%) translateY(-1px) scale(0.98);
}

.floating-cart-badge .cart-badge-count {
  background: var(--accent-color);
  color: white;
  padding: 1px 7px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.floating-cart-badge .cart-badge-icon {
  display: flex;
  align-items: center;
}


/* Only show floating badge on small screens where sidebar is hidden */
@container configurator (max-width: 992px) {
  .floating-cart-badge.has-items {
    display: flex;
  }
}

/* On large screens, sidebar is visible so we don't need the floating badge */
@container configurator (min-width: 993px) {
  .floating-cart-badge {
    display: none !important;
  }
}

/* (Bottom sheet drawer removed â€” incompatible with container-type:inline-size) */

/* =============================================
   NUMBER INPUT STEPPER
   ============================================= */
.number-input-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1rem;
  animation: heroFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.number-input-card label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.number-input-card .input-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.stepper-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-width: 240px;
  background: var(--bg-main);
}

.stepper-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--bg-card);
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  flex-shrink: 0;
}

.stepper-btn:hover {
  background: var(--bg-card-hover);
}

.stepper-btn:active {
  background: rgba(var(--accent-rgb), 0.1);
}

.stepper-input {
  flex: 1;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  padding: 0.75rem 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  font-family: var(--font-main);
  background: transparent;
  color: var(--text-primary);
  -moz-appearance: textfield;
  appearance: textfield;
  min-width: 0;
}

.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stepper-input:focus {
  outline: none;
  background: rgba(var(--accent-rgb), 0.04);
}

/* =============================================
   SKELETON LOADING
   ============================================= */
.skeleton {
  background: linear-gradient(90deg,
      var(--bg-card-hover) 25%,
      var(--bg-card) 50%,
      var(--bg-card-hover) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.skeleton-card-image {
  aspect-ratio: 1/1;
  width: 100%;
}

.skeleton-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skeleton-line {
  height: 14px;
  border-radius: 4px;
}

.skeleton-line.short {
  width: 60%;
}

.skeleton-line.medium {
  width: 80%;
}

.skeleton-line.long {
  width: 100%;
}

/* =============================================
   FOCUS STATES & ACCESSIBILITY
   ============================================= */
*:focus-visible {
  outline: 2px solid var(--accent-color);
}

.option-card:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(var(--accent-rgb), 0.15);
}

.group-card:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 3px;
}

.step-dot:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 3px;
}

/* =============================================
   REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .step-container.slide-in-right,
  .step-container.slide-in-left {
    animation: none;
    opacity: 1;
  }

  .skeleton {
    animation: none;
  }
}

/* --- Salesperson Selections --- */
.salesperson-card {
  background: var(--bg-main);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.salesperson-card:hover {
  border-color: rgba(var(--accent-rgb), 0.5);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.salesperson-card.selected {
  border-color: var(--accent-color);
  background: rgba(var(--accent-rgb), 0.05);
}

.salesperson-card.selected::after {
  content: '\2713';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 20px;
  height: 20px;
  background: var(--accent-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

/* Customer Details Grid (Modal) */
.customer-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .customer-details-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   RESPONSIVE BUTTON TEXTS
   ============================================= */
.btn-text-short {
  display: none;
}

.btn-text-long {
  display: inline;
  white-space: nowrap;
}

.btn.btn-minimized-1 .btn-text-long {
  display: none !important;
}

.btn.btn-minimized-1 .btn-text-short {
  display: inline !important;
  white-space: nowrap;
}

.btn.btn-minimized-2 .btn-text-long {
  display: none !important;
}

.btn.btn-minimized-2 .btn-text-short {
  display: none !important;
}

.final-summary-page {
  padding-bottom: env(safe-area-inset-bottom, 0px);
  /* Base safe-area support */
}

.final-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  /* Prevent toolbar intereption on iOS/Android */
}

@container configurator (max-width: 580px) {
  .final-summary-actions>div {
    flex: 1;
    min-width: 200px;
    margin-left: 0 !important;
  }

  .final-summary-actions .btn {
    flex: 1;
  }
}

/* Fallback for elements outside the configurator container (e.g., modals) */
@media (max-width: 580px) {
  .pdf-modal .btn {
    flex: 1;
  }
}

.btn .material-symbols-rounded {
  flex-shrink: 0;
}

/* Custom Scrollbars */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: var(--bg-main);
}

*::-webkit-scrollbar-thumb {
  background: #a3a3a3;
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
  background: #a3a3a3;
}

*::-webkit-scrollbar-button {
  display: none;
}

* {
  scrollbar-color: #a3a3a3 var(--bg-main);
  scrollbar-width: thin;
}

/* Scroll Hint */
.scroll-hint-container {
  position: sticky;
  bottom: 95px;
  z-index: 45;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  height: 60px;
  pointer-events: none;
  margin-top: -20px;
  margin-bottom: 0px;
}

.scroll-hint {
  width: 46px;
  height: 46px;
  background: var(--text-primary);
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-main);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  position: relative;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  animation: bounceHint 2s infinite ease-in-out;
  -webkit-tap-highlight-color: transparent !important;
}

/* Extended touch target for better UX */
.scroll-hint::after {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  bottom: -20px;
  left: -20px;
  border-radius: 50%;
}

.scroll-hint.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

@keyframes bounceHint {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(8px);
  }
}

/* Splash Screen */
.splash-screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-main);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.splash-logo-container {
  height: 48px;
  max-width: 70%;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: splashPulse 2s infinite ease-in-out;
}

.splash-logo {
  height: 100%;
  width: 100%;
  object-fit: contain;
  transition: opacity 0.5s ease;
}

.splash-logo.hidden {
  opacity: 0;
}

.splash-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: splashSpin 1s linear infinite;
}

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

@keyframes splashPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(0.95);
  }
}

/* Workspace Status Flags */
.draft-banner {
  position: fixed;
  bottom: 50%;
  width: max-content;
  max-width: 90%;
  margin-left: 50%;
  transform: translateX(-50%);
  background: #ffedd5;
  border: 1px solid #fed7aa;
  color: #c2410c;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(234, 88, 12, 0.15);
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.suspended-overlay {
  position: fixed;
  inset: 0;
  background: #f8fafc;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.suspended-overlay span {
  font-size: 64px;
  color: #ef4444;
  margin-bottom: 1.5rem;
}

.suspended-overlay h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
}

.suspended-overlay p {
  font-size: 1rem;
  color: #64748b;
  margin: 0;
}

/* =============================================
   CUSTOM SELECT DROPDOWN PLUGIN
   ============================================= */
.custom-select-container {
  position: relative;
  width: 100%;
  user-select: none;
  font-family: inherit;
}

/* Inherit styling when replacing form-control */
.custom-wrapper-form-control .custom-select-trigger {
  width: 100%;
  height: 48px;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  font-weight: bold;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  transition: all var(--transition-fast);
  outline: none;
  min-height: 48px;
}

@media (hover: hover) {
  .custom-select-trigger:hover {
    border-color: rgba(var(--accent-rgb), 0.5);
    background: var(--bg-card-hover);
  }
}

.custom-select-container.open .custom-select-trigger {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 1px var(--accent-color);
}

.custom-select-trigger-text {
  display: grid;
  padding-right: 12px;
  flex: 1;
  font-size: 0.85rem;
  text-align: left;
}

.custom-select-trigger-text::after {
  content: attr(data-longest-text) "  ";
  visibility: hidden;
  grid-area: 1 / 1;
  white-space: nowrap;
  pointer-events: none;
}

.custom-select-trigger-text>span {
  grid-area: 1 / 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-select-trigger-icon {
  font-size: 20px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.custom-select-container.open .custom-select-trigger-icon {
  transform: rotate(180deg);
  color: var(--accent-color);
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid rgba(var(--accent-rgb), 0.15);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
}

.custom-select-container.open-up .custom-select-dropdown {
  top: auto;
  bottom: calc(100% + 4px);
  transform: translateY(8px);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
  /* invert shadow */
}

.custom-select-container.open .custom-select-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-select-options {
  max-height: 250px;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.custom-select-options::-webkit-scrollbar {
  width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
  background: transparent;
}

.custom-select-options::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
}

@media (hover: hover) {
  .custom-select-options::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
  }
}

.custom-select-option {
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  font-size: 0.95rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  white-space: nowrap;
}

@media (hover: hover) {
  .custom-select-option:hover:not(.disabled) {
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent-color);
  }
}

.custom-select-option.selected {
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent-color);
  font-weight: 600;
}

.custom-select-option.disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Multiple Select visual hints */
.custom-select-multiple .custom-select-option {
  padding-left: 3rem;
  position: relative;
}

.custom-select-multiple .custom-select-option::before {
  content: '';
  position: absolute;
  left: 1rem;
  width: 16px;
  height: 16px;
  border: 1px solid var(--text-muted);
  border-radius: 3px;
  box-sizing: border-box;
}

.custom-select-multiple .custom-select-option.selected::before {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.custom-select-multiple .custom-select-option.selected::after {
  content: '';
  position: absolute;
  left: 1.3rem;
  /* adjusted for checkmark position inside checkbox */
  top: 50%;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: translateY(-60%) rotate(45deg);
}