/* ==========================================================================
   ASA MADAR ELECTRONIC (آسا مدار الکترونیک) - Premium Industrial Design System
   ========================================================================== */

@import url('fonts.css');

:root {
  /* Color Palette - Cyber Industrial Emerald */
  --color-primary: #059669;
  --color-primary-light: #10b981;
  --color-primary-dark: #047857;
  --color-primary-glow: rgba(16, 185, 129, 0.22);
  --color-accent-gold: #d97706;
  --color-gold-glow: rgba(217, 119, 6, 0.25);

  /* Dark Theme Default */
  --bg-main: #0a0f0d;
  --bg-secondary: #111a15;
  --bg-card: rgba(18, 28, 23, 0.88);
  --bg-card-hover: rgba(24, 38, 30, 0.98);
  --bg-input: #0d1511;
  --border-color: rgba(16, 185, 129, 0.2);
  --border-color-hover: rgba(16, 185, 129, 0.5);
  --border-focus: #10b981;

  /* Typography Colors */
  --text-main: #f3f6f4;
  --text-secondary: #9cb1a5;
  --text-muted: #6b8275;
  --text-inverse: #0a0f0d;

  /* Status */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Shadows & Glassmorphism */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 26px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 45px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 30px rgba(16, 185, 129, 0.25);
  --glass-blur: blur(18px);

  /* Layout */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --container-max: 1280px;

  /* Transition */
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode Overrides */
[data-theme="light"] {
  --bg-main: #f5f8f6;
  --bg-secondary: #eaf1ec;
  --bg-card: rgba(255, 255, 255, 0.96);
  --bg-card-hover: #ffffff;
  --bg-input: #f8faf9;
  --border-color: rgba(5, 150, 105, 0.22);
  --border-color-hover: rgba(5, 150, 105, 0.5);
  --text-main: #0c1a13;
  --text-secondary: #41564b;
  --text-muted: #72897d;
  --text-inverse: #ffffff;
  --shadow-sm: 0 2px 10px rgba(0, 40, 20, 0.06);
  --shadow-md: 0 8px 26px rgba(0, 40, 20, 0.09);
  --shadow-lg: 0 16px 45px rgba(0, 40, 20, 0.14);
  --shadow-glow: 0 0 28px rgba(5, 150, 105, 0.18);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
  font-size: 16px;
}

section[id], div[id] {
  scroll-margin-top: 20px;
}

#calculator {
  scroll-margin-top: 85px;
}

body {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  direction: rtl;
  text-align: right;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.75;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 65%, rgba(5, 150, 105, 0.07) 0%, transparent 45%),
    linear-gradient(rgba(16, 185, 129, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 185, 129, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography Helpers - prevent single-word wrap & broken lines */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.4;
  text-wrap: balance;
  word-break: normal;
}

p {
  text-wrap: pretty;
  word-break: normal;
}

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

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

.num-en {
  font-family: 'Outfit', sans-serif;
  direction: ltr;
  display: inline-block;
}

/* ==========================================================================
   Header & Navbar (Clean, Spacious, No-Wrap)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-color: var(--border-color-hover);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  gap: 1.5rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-logo-img {
  height: 48px;
  width: 48px;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: 0 0 16px var(--color-primary-glow);
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-name {
  font-size: 1.32rem;
  font-weight: 900;
  letter-spacing: -0.3px;
  line-height: 1.3;
  white-space: nowrap;
  background: linear-gradient(135deg, #ffffff 30%, var(--color-primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .brand-name {
  background: linear-gradient(135deg, #064e3b 30%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
  padding: 8px 0;
  white-space: nowrap;
  transition: color var(--transition-fast);
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0%;
  height: 2px;
  border-radius: 2px;
  background: var(--color-primary-light);
  transition: width var(--transition-fast);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-header-track {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 9px 16px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.88rem;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-header-track:hover {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-primary-light);
  border-color: var(--border-color-hover);
  transform: translateY(-1px);
}

.btn-header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-primary-light);
  border: 1px solid var(--border-color);
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.btn-header-phone:hover {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.theme-toggle-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--color-primary-light);
  border-color: var(--border-color-hover);
  background: rgba(16, 185, 129, 0.1);
  transform: rotate(15deg);
}

.mobile-menu-btn {
  display: none;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 8px 12px;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

/* ==========================================================================
   Hero Section & Online Calculator (Prominent Above The Fold)
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 3.8rem 0 4.5rem 0;
}

.hero-header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 2.8rem auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 20px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--border-color-hover);
  color: var(--color-primary-light);
  font-size: 0.88rem;
  font-weight: 700;
  max-width: 100%;
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 900;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
  line-height: 1.35;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #10b981 10%, #34d399 60%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.12rem;
  color: var(--text-secondary);
  line-height: 1.85;
  max-width: 780px;
  margin: 0 auto;
}

/* Calculator Container Card */
.calculator-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-normal);
}

.calculator-card:hover {
  border-color: var(--border-color-hover);
}

.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 400px);
  gap: 0;
}

@media (max-width: 992px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .calc-form-area {
    border-left: none !important;
    border-bottom: 1px solid var(--border-color);
  }
  .calc-summary-area {
    position: static !important;
  }
}

/* Calculator Form Area */
.calc-form-area {
  padding: 2.2rem;
  border-left: 1px solid var(--border-color);
  min-width: 0;
}

.calc-section-title {
  font-size: 1.18rem;
  font-weight: 800;
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.calc-section-title svg {
  color: var(--color-primary-light);
  flex-shrink: 0;
}

/* Form Groups & Inputs */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.4rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.form-label .helper {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-input, .form-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-main);
  transition: all var(--transition-fast);
  outline: none;
  width: 100%;
}

.form-input:focus, .form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.form-select option:disabled {
  color: var(--text-muted, #94a3b8) !important;
  opacity: 0.55;
  background-color: var(--bg-surface, #f8fafc);
  cursor: not-allowed;
}

/* Pills Grid (Board Types & Quantities) */
.pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.qty-pill-grid {
  grid-template-columns: repeat(6, 1fr);
}

.pill-card {
  position: relative;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  user-select: none;
}

.pill-card:hover {
  border-color: var(--border-color-hover);
  background: rgba(16, 185, 129, 0.05);
  transform: translateY(-1px);
}

.pill-card.active {
  border-color: var(--color-primary-light);
  background: rgba(16, 185, 129, 0.12);
  box-shadow: 0 0 14px var(--color-primary-glow);
}

.pill-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  word-break: normal;
}

.pill-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 2px;
  text-align: center;
  word-break: normal;
}

/* Material Sub-Panel (Tailored directly under board structure) */
.material-panel {
  background: rgba(16, 185, 129, 0.04);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  margin-bottom: 1.3rem;
  transition: all var(--transition-normal);
}

.material-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.material-panel-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 7px;
}

.material-panel-title svg {
  color: var(--color-primary-light);
  flex-shrink: 0;
}

.material-badge-hint {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary-light);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Main Category Tabs (PCB vs Stencil) */
.calc-main-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 1.4rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.calc-main-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.calc-main-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.calc-main-tab.active {
  background: var(--color-primary-dark);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.35) 100%);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: 0 2px 12px var(--color-primary-glow);
}

.calc-main-tab svg {
  flex-shrink: 0;
}

.mobile-track-nav-item {
  display: none;
}

#section-pcb-types {
  display: flex;
  flex-direction: column;
}

#section-pcb-types > .calc-section-title {
  order: 1;
}

#section-pcb-types > .pill-grid {
  order: 2;
}

#section-pcb-types > .material-panel {
  order: 3;
}

#section-pcb-types > .special-orders-banner {
  order: 4;
}

/* Special Orders Banner (2-layers+, Rogers, Flexible) */
.special-orders-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-top: 1.2rem;
  margin-bottom: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.special-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.special-orders-banner p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0;
}

.special-orders-banner p strong {
  color: #f8fafc;
}

.btn-special-inquiry {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-special-inquiry:hover {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
}

/* Stencil Config Panel */
.stencil-config-panel {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 1.6rem;
}

/* Solder Mask Color Swatches */
.swatch-group {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.swatch-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.swatch-item:hover {
  border-color: var(--border-color-hover);
}

.swatch-item.active {
  border-color: var(--color-primary-light);
  background: rgba(16, 185, 129, 0.15);
  box-shadow: 0 0 12px var(--color-primary-glow);
}

.swatch-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.swatch-group.is-disabled,
.swatch-container.is-disabled {
  opacity: 0.35 !important;
  pointer-events: none !important;
  filter: grayscale(0.85);
  cursor: not-allowed !important;
}

/* Gerber Upload Zone */
.upload-dropzone {
  border: 2px dashed var(--border-color-hover);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  text-align: center;
  background: rgba(16, 185, 129, 0.03);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 0.6rem;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--color-primary-light);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: inset 0 0 15px var(--color-primary-glow);
}

.upload-icon {
  font-size: 2.2rem;
  color: var(--color-primary-light);
  margin-bottom: 6px;
  line-height: 1;
}

.upload-text-main {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  line-height: 1.4;
}

.upload-text-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: center;
  line-height: 1.45;
}

.file-selected-badge {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--color-primary-light);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Upload Progress Bar & Percentage (Lock state and modern animation)
   ========================================================================== */
.upload-progress-container {
  display: none;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 480px;
  margin: 10px auto 0 auto;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  box-sizing: border-box;
}

.upload-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.upload-progress-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.upload-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(56, 189, 248, 0.25);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spinUpload 0.8s linear infinite;
  flex-shrink: 0;
}

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

.upload-progress-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f1f5f9;
}

.upload-progress-percent {
  font-size: 0.95rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

.upload-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #38bdf8 100%);
  border-radius: 999px;
  transition: width 0.15s ease-out;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
  position: relative;
}

.upload-progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
  animation: shimmerUpload 1.5s infinite;
}

@keyframes shimmerUpload {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.upload-progress-subtext {
  font-size: 0.76rem;
  color: #94a3b8;
  text-align: right;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-file-locked {
  cursor: pointer !important;
  pointer-events: auto !important;
}

.btn-gerber-remove {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-gerber-remove:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
}

.sample-gerber-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary-light);
  background: rgba(16, 185, 129, 0.12);
  border: 1px dashed rgba(16, 185, 129, 0.4);
  padding: 6px 12px;
  border-radius: 6px;
  margin-top: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.sample-gerber-trigger:hover {
  background: rgba(16, 185, 129, 0.22);
  color: #ffffff;
  border-color: var(--color-primary-light);
  transform: translateY(-1px);
}

.btn-gerber-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-gerber-tool:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.btn-gerber-tool:disabled,
.btn-gerber-tool.disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  filter: grayscale(0.9);
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: var(--text-muted) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  transform: none !important;
  box-shadow: none !important;
}

/* ==========================================================================
   Calculator Summary Sidebar & Live PCB Visualizer
   ========================================================================== */
.calc-summary-area {
  padding: 2rem 2.2rem;
  background: rgba(13, 21, 17, 0.6);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.25rem;
  min-width: 0;
  position: relative;
}

[data-theme="light"] .calc-summary-area {
  background: rgba(240, 246, 242, 0.95);
}

/* Live PCB Visual Box */
.pcb-visual-box {
  background: #080c0a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 1.2rem;
  text-align: center;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.85), 0 4px 16px rgba(0, 0, 0, 0.3);
}

.pcb-visual-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pcb-render-canvas {
  width: 100%;
  height: 155px;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.05) 0%, rgba(0, 0, 0, 0.4) 100%);
}

.pcb-circuit-svg {
  width: 100%;
  height: 100%;
}

/* Price Box */
.price-display-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.22) 100%);
  border: 1px solid var(--border-color-hover);
  border-radius: var(--radius-md);
  padding: 1.3rem;
  margin-bottom: 1.2rem;
  position: relative;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Price Notice Box - Modern, High-Tech, Crisp in PCB & Stencil */
.price-notice-card {
  text-align: center;
  padding: 1.35rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 23, 42, 0.8) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
  margin-bottom: 1.2rem;
}

[data-theme="light"] .price-notice-card {
  background: linear-gradient(145deg, #f0fdf4 0%, #ffffff 100%);
  border-color: #86efac;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.12);
}

/* Stencil Mode Accent for Notice Card */
.price-notice-card.stencil-mode {
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.1) 0%, rgba(15, 23, 42, 0.85) 100%);
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .price-notice-card.stencil-mode {
  background: linear-gradient(145deg, #f0f9ff 0%, #ffffff 100%);
  border-color: #7dd3fc;
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.12);
}

.price-notice-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.price-notice-card.stencil-mode .price-notice-badge {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8;
}

[data-theme="light"] .price-notice-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border-color: #86efac;
}

[data-theme="light"] .price-notice-card.stencil-mode .price-notice-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #0284c7;
  border-color: #7dd3fc;
}

/* The Target Headline: تعیین قیمت قطعی پس از بررسی مهندسی فایل */
.price-notice-headline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 900;
  color: #f8fafc;
  line-height: 1.6;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.price-notice-headline .price-notice-icon {
  color: #34d399;
  flex-shrink: 0;
}

.price-notice-card.stencil-mode .price-notice-headline .price-notice-icon {
  color: #38bdf8;
}

[data-theme="light"] .price-notice-headline {
  color: #0f172a;
}

[data-theme="light"] .price-notice-headline .price-notice-icon {
  color: #059669;
}

[data-theme="light"] .price-notice-card.stencil-mode .price-notice-headline .price-notice-icon {
  color: #0284c7;
}

.price-notice-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.7;
  margin: 0;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

[data-theme="light"] .price-notice-desc {
  color: #475569;
}

.calc-trust-badge {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 1.2rem;
}

.trust-badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--color-primary-light);
}

.trust-badge-item svg {
  flex-shrink: 0;
}

.price-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  white-space: nowrap;
}

.price-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.approx-badge {
  background: var(--color-accent-gold);
  color: #ffffff;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 800;
  box-shadow: 0 2px 6px var(--color-gold-glow);
  white-space: nowrap;
}

.price-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  white-space: nowrap;
}

.price-amount {
  font-size: 2.3rem;
  font-weight: 900;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -1px;
}

[data-theme="light"] .price-amount {
  color: #064e3b;
}

.price-currency {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-primary-light);
}

.unit-price-row {
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-top: 1px dashed var(--border-color);
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  white-space: nowrap;
}

/* Specs Breakdown */
.specs-breakdown-list {
  list-style: none;
  font-size: 0.84rem;
  margin-bottom: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0;
}

.specs-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  color: var(--text-secondary);
  gap: 10px;
}

.specs-item span {
  flex-shrink: 0;
}

.specs-item strong {
  color: var(--text-main);
  font-weight: 700;
  text-align: left;
  word-break: break-word;
  white-space: normal;
  max-width: 62%;
}

/* Disclaimer */
.price-disclaimer {
  font-size: 0.74rem;
  line-height: 1.7;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-right: 3px solid var(--color-accent-gold);
  margin-bottom: 1.3rem;
  text-wrap: pretty;
}

/* Action Buttons */
.btn-primary-action {
  width: 100%;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  line-height: 1.35;
  box-shadow: 0 4px 20px var(--color-primary-glow);
  transition: all var(--transition-fast);
  margin-bottom: 10px;
}

.btn-primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}

.btn-secondary-action {
  width: 100%;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 11px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  line-height: 1.35;
  transition: all var(--transition-fast);
}

.btn-secondary-action:hover {
  background: rgba(16, 185, 129, 0.08);
  color: var(--color-primary-light);
  border-color: var(--border-color-hover);
}

/* ==========================================================================
   Features, Specs & Process Sections
   ========================================================================== */
.features-section {
  padding: 5rem 0;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem auto;
}

.section-tag {
  color: var(--color-primary-light);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: inline-block;
  white-space: nowrap;
}

.section-title {
  font-size: 2.15rem;
  font-weight: 900;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  text-wrap: balance;
}

.features-section .container {
  max-width: 1400px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.2rem;
}

.feature-box {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.15rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 265px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
}

.feature-box:hover {
  transform: translateY(-6px);
  border-color: var(--border-color-hover);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(16, 185, 129, 0.25);
}

.feature-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.08) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-light);
  margin: 0 auto 1.2rem auto;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25), inset 0 0 12px rgba(16, 185, 129, 0.12);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.feature-box:hover .feature-icon-wrap {
  transform: scale(1.1);
  border-color: var(--color-primary-light);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.4);
}

.feature-icon-wrap svg {
  width: 26px;
  height: 26px;
  stroke: var(--color-primary-light);
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
  line-height: 1.45;
  color: var(--text-main);
  text-align: center;
  white-space: nowrap;
}

.feature-text {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.72;
  text-align: center;
}

@media (max-width: 1250px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
  }
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
  .feature-box {
    padding: 1.3rem 0.9rem;
    min-height: auto;
  }
  .feature-icon-wrap {
    width: 46px;
    height: 46px;
    margin: 0 auto 0.75rem auto;
  }
  .feature-icon-wrap svg {
    width: 22px;
    height: 22px;
  }
  .feature-title {
    font-size: 0.92rem;
    white-space: normal;
    margin-bottom: 0.4rem;
  }
  .feature-text {
    font-size: 0.76rem;
    line-height: 1.55;
  }
}

@media (max-width: 440px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* Specs Table */
.specs-section {
  padding: 5rem 0;
  background: rgba(17, 26, 21, 0.4);
}

[data-theme="light"] .specs-section {
  background: rgba(238, 244, 240, 0.6);
}

.specs-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 185, 129, 0.4) rgba(0, 0, 0, 0.2);
  padding-bottom: 4px;
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
  display: block;
}

.table-responsive::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.4);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 185, 129, 0.7);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.94rem;
}

.specs-table th {
  background: rgba(16, 185, 129, 0.1);
  color: var(--text-main);
  font-weight: 800;
  padding: 16px 20px;
  border-bottom: 2px solid var(--border-color-hover);
  white-space: nowrap;
}

.specs-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.specs-table tr:hover td {
  background: rgba(16, 185, 129, 0.04);
  color: var(--text-main);
}

.badge-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-primary-light);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .specs-table-card {
    border: none;
    background: transparent;
    box-shadow: none;
  }
  .specs-table, 
  .specs-table thead, 
  .specs-table tbody, 
  .specs-table th, 
  .specs-table td, 
  .specs-table tr {
    display: block !important;
    width: 100% !important;
  }
  .specs-table thead {
    display: none !important;
  }
  .specs-table tr {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
  }
  .specs-table td {
    padding: 5px 0;
    border-bottom: 1px dashed rgba(16, 185, 129, 0.15);
    font-size: 0.78rem;
    line-height: 1.5;
    text-align: right;
  }
  .specs-table td:first-child {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--color-primary-light);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
    margin-bottom: 4px;
    text-align: center;
  }
  .specs-table td:last-child {
    border-bottom: none;
    font-size: 0.74rem;
    color: var(--text-muted);
    padding-top: 4px;
  }
  .specs-table td strong {
    color: var(--color-primary-light);
  }
}

/* Production Process */
.process-section {
  padding: 5rem 0;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.process-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  transition: all var(--transition-fast);
}

.process-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-color-hover);
}

.step-number {
  font-size: 2.2rem;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  color: rgba(16, 185, 129, 0.3);
  line-height: 1;
  margin-bottom: 1rem;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
  white-space: normal;
  line-height: 1.35;
}

.step-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Showcase */
.showcase-section {
  padding: 5rem 0;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.showcase-img-box {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.showcase-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.showcase-img-box:hover .showcase-img {
  transform: scale(1.04);
}

.showcase-overlay-tag {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(10, 15, 13, 0.88);
  backdrop-filter: var(--glass-blur);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid var(--border-color);
  color: var(--color-primary-light);
  white-space: nowrap;
}

/* FAQ Section */
.faq-section {
  padding: 5rem 0;
}

.faq-list {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.faq-item.open {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-md), 0 0 20px var(--color-primary-glow);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.04) 0%, var(--bg-card) 100%);
}

.faq-question {
  padding: 1.15rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  gap: 14px;
  transition: color var(--transition-fast);
}

.faq-item.open .faq-question {
  color: var(--color-primary-light);
}

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--color-primary-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease, color 0.3s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
  background: #10b981;
  color: #020617;
  border-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.5rem;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  border-top: none;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s ease, opacity 0.25s ease;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.85;
}

.faq-item.open .faq-answer {
  max-height: 1000px;
  padding: 12px 1.5rem 1.4rem 1.5rem;
  opacity: 1;
  visibility: visible;
  border-top: 1px dashed rgba(16, 185, 129, 0.2);
}

/* ==========================================================================
   Modals (Order Submission, Tracking, Callback - High Polish)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color-hover);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-lg), 0 0 50px var(--color-primary-glow);
  transform: translateY(20px) scale(0.97);
  transition: all var(--transition-normal);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.modal-overlay.active .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-dialog form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  margin: 0;
}

.modal-head {
  padding: 1.3rem 1.8rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  background: var(--bg-card);
}

.modal-title {
  font-size: 1.22rem;
  font-weight: 800;
  white-space: nowrap;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--danger);
  color: var(--danger);
}

.modal-body {
  padding: 1.6rem 1.8rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.modal-foot {
  padding: 1.2rem 1.8rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  background: var(--bg-card);
  position: relative;
  z-index: 5;
}

.modal-foot .btn-primary-action {
  width: auto;
  margin-bottom: 0;
  padding: 12px 26px;
  font-size: 0.96rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
  color: #ffffff;
  box-shadow: 0 4px 18px var(--color-primary-glow);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.modal-foot .btn-secondary-action {
  width: auto;
  margin-bottom: 0;
  padding: 12px 20px;
  font-size: 0.92rem;
}

.track-result-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid var(--border-color-hover);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  margin-top: 1.2rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4.5rem 0 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

.footer-col-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  line-height: 1.85;
}

.footer-heading {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 1.4rem;
  color: var(--text-main);
  white-space: nowrap;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  padding: 0;
}

.footer-links a:hover {
  color: var(--color-primary-light);
  transform: translateX(-4px);
  display: inline-block;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  white-space: nowrap;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color-hover);
  backdrop-filter: var(--glass-blur);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  animation: slide-up 0.3s ease;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast.success { border-right: 4px solid var(--success); }
.toast.error { border-right: 4px solid var(--danger); }
.toast.warning { border-right: 4px solid #f59e0b; }
.toast.info { border-right: 4px solid #3b82f6; }

/* ==========================================================================
   Responsive Breakpoints & Mobile Drawer
   ========================================================================== */

/* 1. Small & Medium Laptops (13-inch & 14-inch Displays, 1024px - 1366px) */
@media (max-width: 1366px) {
  /* Navbar Compactness for 13" Laptops */
  .nav-inner {
    height: 74px;
    gap: 1.1rem;
  }
  .brand-wrapper {
    gap: 10px;
  }
  .brand-logo-img {
    height: 42px;
    width: 42px;
  }
  .brand-name {
    font-size: 1.2rem;
  }
  .brand-subtitle {
    font-size: 0.72rem;
  }
  .nav-menu {
    gap: 1.1rem;
  }
  .nav-link {
    font-size: 0.88rem;
    padding: 6px 0;
  }
  .header-actions {
    gap: 8px;
  }
  .btn-header-phone {
    padding: 7px 14px;
    font-size: 0.84rem;
  }
  .btn-header-track {
    padding: 7px 12px;
    font-size: 0.82rem;
  }

  /* Hero Section: Optimize for 13" Display Heights (650px - 750px) */
  .hero-section {
    padding: 2.8rem 0 2.2rem 0;
  }
  .hero-header {
    margin-bottom: 1.8rem;
  }
  .hero-title {
    font-size: 2.35rem;
    line-height: 1.35;
  }
  .hero-subtitle {
    font-size: 0.92rem;
    line-height: 1.6;
  }

  /* Calculator Layout on 13" Laptops */
  .calc-grid {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
  .calc-form-area {
    padding: 1.6rem 1.8rem;
  }
  .calc-summary-area {
    padding: 1.5rem 1.6rem;
  }
  .pill-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
  }
  .form-row {
    gap: 10px;
  }
  .specs-breakdown-list {
    font-size: 0.78rem;
    gap: 4px;
  }
  .specs-item {
    padding: 4px 0;
  }
  .pcb-visual-box {
    padding: 10px;
    margin-bottom: 0.9rem;
  }

  /* Dropdowns on 13" Laptops */
  .form-input, .form-select {
    height: 44px;
    padding: 9px 12px;
    font-size: 0.88rem;
  }
  .custom-select-trigger {
    min-height: 44px;
    padding: 10px 14px;
    gap: 10px;
  }
  .custom-select-placeholder,
  .custom-select-selected-title {
    font-size: 0.88rem;
  }
  .custom-select-menu {
    max-height: 270px;
    padding: 6px;
  }
  .custom-select-option {
    padding: 8px 12px;
    margin-bottom: 3px;
    gap: 10px;
  }
  .custom-select-option-title {
    font-size: 0.86rem;
  }
  .custom-select-option-sub {
    font-size: 0.74rem;
  }
  .custom-select-option-badge {
    font-size: 0.69rem;
    padding: 2px 7px;
  }

  /* Toast Notifications on 13" Laptops */
  .toast-container {
    bottom: 20px;
    left: 20px;
    max-width: 440px;
  }
  .toast {
    padding: 12px 16px;
    font-size: 0.88rem;
    white-space: normal;
    line-height: 1.45;
    word-break: break-word;
  }
}

/* 2. Compact Laptops & Large Tablets (<= 1180px) */
@media (max-width: 1180px) {
  .nav-menu {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-track-nav-item {
    display: block !important;
    width: 100% !important;
    margin-bottom: 8px !important;
  }
  .mobile-track-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: rgba(16, 185, 129, 0.12) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
    border-radius: var(--radius-sm) !important;
    padding: 10px 14px !important;
    font-weight: 700 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .mobile-track-link:hover {
    background: rgba(16, 185, 129, 0.22) !important;
    color: #34d399 !important;
  }
  #section-pcb-types {
    display: flex !important;
    flex-direction: column !important;
  }
  #section-pcb-types > .calc-section-title {
    order: 1 !important;
  }
  #section-pcb-types > .pill-grid {
    order: 2 !important;
  }
  #section-pcb-types > .special-orders-banner,
  .special-orders-banner {
    order: 3 !important;
    margin-top: 0.55rem !important;
    margin-bottom: 0.75rem !important;
    padding: 8px 12px !important;
    gap: 6px !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(30, 41, 59, 0.75) 100%) !important;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
  }
  .special-orders-banner .special-badge {
    font-size: 0.68rem !important;
    padding: 2px 7px !important;
    gap: 4px !important;
    border-radius: 12px !important;
  }
  .special-orders-banner .special-badge svg {
    width: 12px !important;
    height: 12px !important;
  }
  .special-orders-banner p {
    font-size: 0.72rem !important;
    line-height: 1.55 !important;
    color: #94a3b8 !important;
    margin: 0 !important;
  }
  .special-orders-banner p strong {
    color: #e2e8f0 !important;
    font-weight: 600 !important;
  }
  .special-orders-banner .btn-special-inquiry {
    padding: 5px 10px !important;
    font-size: 0.72rem !important;
    gap: 5px !important;
    border-radius: 6px !important;
    width: 100% !important;
    justify-content: center !important;
    margin-top: 2px !important;
  }
  .special-orders-banner .btn-special-inquiry svg {
    width: 13px !important;
    height: 13px !important;
  }
  #section-pcb-types > .material-panel {
    order: 4 !important;
  }
  .btn-header-track {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: 0.82rem;
  }
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .calc-form-area {
    border-left: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1.6rem;
  }
  .calc-summary-area {
    position: static;
    padding: 1.6rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .showcase-grid {
    grid-template-columns: 1fr;
  }

  /* Dropdowns on Compact Laptops & Large Tablets */
  .custom-select-trigger {
    min-height: 42px;
    padding: 9px 12px;
  }
  .custom-select-placeholder,
  .custom-select-selected-title {
    font-size: 0.86rem;
  }
  .custom-select-menu {
    max-height: 250px;
  }
  .custom-select-option {
    padding: 8px 11px;
  }
  .custom-select-option-title {
    font-size: 0.85rem;
  }
  .custom-select-option-sub {
    font-size: 0.72rem;
  }

  /* Toast Notifications */
  .toast-container {
    bottom: 18px;
    left: 18px;
    max-width: 420px;
  }
  .toast {
    padding: 11px 15px;
    font-size: 0.86rem;
    white-space: normal;
    line-height: 1.45;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 0.75rem 0;
  }
  .nav-inner {
    padding: 0 1rem;
  }
  .brand-name {
    font-size: 1.1rem;
  }
  .brand-subtitle {
    font-size: 0.65rem;
  }
  .btn-header-phone {
    padding: 7px 12px;
    font-size: 0.84rem;
  }

  .hero-section {
    padding: 2.4rem 0 3.2rem 0;
  }
  .hero-header {
    margin-bottom: 1.8rem;
  }
  .hero-badge {
    font-size: 0.74rem;
    padding: 6px 14px;
    white-space: normal;
    text-align: center;
    line-height: 1.5;
  }
  .hero-title {
    font-size: 1.85rem;
    line-height: 1.35;
  }
  .hero-subtitle {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  /* Calculator Form & Summary */
  .calc-form-area, .calc-summary-area {
    padding: 1.4rem;
  }
  .calc-main-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 1.4rem;
  }
  .calc-main-tab {
    width: 100%;
    justify-content: center;
    font-size: 0.9rem;
    padding: 11px 14px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .pill-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .qty-pill-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .swatch-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .swatch-item {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
    font-size: 0.82rem;
    padding: 8px 10px;
  }
  .upload-dropzone {
    padding: 1.4rem 1rem;
  }
  .file-selected-badge {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    text-align: center;
  }
  .file-selected-badge > div {
    justify-content: center;
  }
  .pcb-visual-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .pcb-visual-title > div {
    width: 100%;
    justify-content: space-between;
  }
  .specs-breakdown-list {
    padding: 10px;
  }
  .specs-item {
    font-size: 0.85rem;
    padding: 7px 0;
  }

  /* Modals on Mobile & Tablet */
  .modal-dialog {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 94vh !important;
    border-radius: 14px;
    margin: 0 auto;
  }
  .modal-head {
    padding: 1.1rem 1.2rem;
  }
  .modal-title {
    font-size: 1.1rem;
    white-space: normal;
    line-height: 1.35;
  }
  .modal-body {
    padding: 1.2rem 1.2rem;
  }
  .modal-foot {
    padding: 1.1rem 1.2rem;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 8px;
  }
  .modal-foot .btn-primary-action,
  .modal-foot .btn-secondary-action {
    width: 100%;
    justify-content: center;
    margin: 0;
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.2rem !important;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  /* Dropdowns on Tablets */
  .form-input, .form-select {
    height: 40px;
    padding: 8px 12px;
    font-size: 0.86rem;
  }
  .custom-select-trigger {
    min-height: 40px;
    height: 40px;
    padding: 8px 12px;
    border-radius: 8px;
    gap: 8px;
  }
  .custom-select-placeholder,
  .custom-select-selected-title {
    font-size: 0.86rem;
  }
  .custom-select-arrow svg {
    width: 16px;
    height: 16px;
  }
  .custom-select-menu {
    max-height: 240px;
    padding: 6px;
    top: calc(100% + 4px);
    border-radius: 8px;
  }
  .custom-select-option {
    padding: 8px 10px;
    margin-bottom: 3px;
    gap: 8px;
    border-radius: 6px;
  }
  .custom-select-option-main {
    gap: 8px;
    min-width: 0;
  }
  .custom-select-option-title {
    font-size: 0.84rem;
  }
  .custom-select-option-sub {
    font-size: 0.72rem;
    line-height: 1.35;
  }
  .custom-select-option-badge {
    font-size: 0.68rem;
    padding: 2px 6px;
    margin-left: 4px;
  }

  /* Notifications & Toasts on Tablets */
  .toast-container {
    bottom: 18px;
    left: 16px;
    right: 16px;
    margin: 0 auto;
    width: auto;
    max-width: 480px;
    align-items: center;
    pointer-events: none;
    z-index: 9999;
  }
  .toast {
    pointer-events: auto;
    width: 100%;
    max-width: 100%;
    padding: 10px 14px;
    font-size: 0.84rem;
    border-radius: 10px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.45;
    gap: 8px;
    justify-content: flex-start;
    text-align: right;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
  }
  .toast > span {
    flex: 1;
    min-width: 0;
    line-height: 1.45;
  }

  /* Auto-Detection Notice Box & Dimension Hints on Tablet */
  .dimension-auto-notice {
    padding: 10px 14px;
    font-size: 0.80rem;
    gap: 10px;
    line-height: 1.55;
  }
  .dim-extracted-hint {
    padding: 7px 12px;
    font-size: 0.78rem;
    gap: 6px;
  }
}

@media (max-width: 480px) {
  /* Prevent any horizontal blowout on mobile */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  .container {
    padding: 0 10px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .site-header {
    padding: 0 !important;
  }

  .nav-inner {
    height: 56px !important;
    padding: 0 4px !important;
    gap: 6px !important;
  }

  .brand-wrapper {
    gap: 8px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .brand-logo-img {
    width: 34px !important;
    height: 34px !important;
    flex-shrink: 0 !important;
  }

  .brand-text {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .brand-name {
    font-size: 0.92rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
  }

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

  .header-actions {
    gap: 5px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  .btn-header-phone,
  .btn-header-track {
    width: 35px !important;
    height: 35px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  .btn-header-phone span,
  .btn-header-track span {
    display: none !important;
  }

  .btn-header-phone svg,
  .btn-header-track svg {
    width: 16px !important;
    height: 16px !important;
  }

  .theme-toggle-btn {
    width: 35px !important;
    height: 35px !important;
    flex-shrink: 0 !important;
  }

  .theme-toggle-btn svg {
    width: 16px !important;
    height: 16px !important;
  }

  .mobile-menu-btn {
    width: 35px !important;
    height: 35px !important;
    padding: 0 !important;
    font-size: 1.2rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  /* Hero Section */
  .hero-section {
    padding: 1.2rem 0 1.8rem 0 !important;
  }

  .hero-header {
    margin-bottom: 1.2rem !important;
  }

  .hero-badge {
    font-size: 0.7rem !important;
    padding: 5px 10px !important;
    border-radius: 12px !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.45 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 0.8rem !important;
  }

  .hero-badge svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0 !important;
  }

  .hero-title {
    font-size: 1.35rem !important;
    line-height: 1.38 !important;
    margin-bottom: 0.5rem !important;
  }

  .hero-subtitle {
    font-size: 0.8rem !important;
    line-height: 1.55 !important;
    margin-bottom: 1rem !important;
  }

  /* Calculator Card & Form */
  .calculator-card {
    border-radius: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .calc-form-area, .calc-summary-area {
    padding: 0.85rem 0.65rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .calc-main-tabs {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin-bottom: 1rem !important;
  }

  .calc-main-tab {
    width: 100% !important;
    padding: 9px 10px !important;
    font-size: 0.82rem !important;
    border-radius: 8px !important;
    justify-content: center !important;
  }

  .calc-section-title {
    font-size: 0.92rem !important;
    white-space: normal !important;
    line-height: 1.4 !important;
    margin-bottom: 0.75rem !important;
    gap: 6px !important;
    align-items: flex-start !important;
  }

  .calc-section-title svg {
    width: 17px !important;
    height: 17px !important;
    flex-shrink: 0 !important;
    margin-top: 2px !important;
  }

  .form-row {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin-bottom: 0.85rem !important;
  }

  .form-group {
    margin-bottom: 0.85rem !important;
  }

  .form-label {
    font-size: 0.79rem !important;
    white-space: normal !important;
    gap: 4px !important;
  }

  .form-label .helper {
    font-size: 0.68rem !important;
  }

  .form-input, .form-select {
    font-size: 0.84rem !important;
    padding: 8px 10px !important;
    height: 38px !important;
    border-radius: 8px !important;
  }

  /* Pills 2-Column Grid on Mobile */
  .pill-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  .pill-card {
    padding: 7px 5px !important;
    min-height: 48px !important;
    border-radius: 8px !important;
  }

  .pill-title {
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.25 !important;
  }

  .pill-desc {
    font-size: 0.65rem !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.3 !important;
    margin-top: 1px !important;
  }

  /* Material sub-panel */
  .material-panel {
    padding: 8px !important;
    border-radius: 8px !important;
    margin-bottom: 0.85rem !important;
  }

  .material-panel-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    margin-bottom: 8px !important;
  }

  .material-panel-title {
    font-size: 0.78rem !important;
    white-space: normal !important;
  }

  .material-badge-hint {
    font-size: 0.68rem !important;
    padding: 2px 6px !important;
    border-radius: 6px !important;
  }

  .special-orders-banner {
    padding: 8px 10px !important;
    border-radius: 8px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
  }

  .special-text {
    font-size: 0.75rem !important;
    line-height: 1.45 !important;
  }

  /* Quantity Pills */
  .qty-pill-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 5px !important;
  }

  .qty-pill-grid .pill-card {
    padding: 6px 2px !important;
    min-height: 36px !important;
  }

  .qty-pill-grid .pill-title {
    font-size: 0.84rem !important;
  }

  /* Solder mask swatches */
  .swatch-group {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 5px !important;
  }

  .swatch-item {
    white-space: normal !important;
    padding: 6px 8px !important;
    font-size: 0.75rem !important;
    gap: 5px !important;
    border-radius: 8px !important;
    justify-content: flex-start !important;
  }

  .swatch-circle {
    width: 15px !important;
    height: 15px !important;
    flex-shrink: 0 !important;
  }

  /* File upload */
  .upload-dropzone {
    padding: 1rem 0.6rem !important;
    border-radius: 8px !important;
  }

  .upload-icon {
    width: 36px !important;
    height: 36px !important;
    margin-bottom: 6px !important;
  }

  .upload-icon svg {
    width: 22px !important;
    height: 22px !important;
  }

  .upload-text-main {
    font-size: 0.82rem !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.35 !important;
  }

  .upload-text-sub {
    font-size: 0.68rem !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.45 !important;
  }

  .file-selected-badge {
    padding: 8px !important;
    gap: 6px !important;
    border-radius: 6px !important;
  }

  #file-selected-name {
    font-size: 0.78rem !important;
    word-break: break-all !important;
  }

  .btn-gerber-tool, .btn-gerber-remove {
    width: 100% !important;
    justify-content: center !important;
    font-size: 0.74rem !important;
    padding: 6px 8px !important;
  }

  /* Summary Section */
  .pcb-visual-box {
    padding: 8px !important;
    border-radius: 8px !important;
  }

  .pcb-visual-title {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }

  .pcb-visual-title span {
    font-size: 0.82rem !important;
  }

  .pcb-visual-title > div {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
  }

  #pcb-canvas-wrap {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .price-display-card {
    padding: 0.85rem 0.65rem !important;
    border-radius: 8px !important;
  }

  .price-display-card div {
    font-size: 0.92rem !important;
    line-height: 1.4 !important;
  }

  .price-display-card p {
    font-size: 0.74rem !important;
    line-height: 1.55 !important;
  }

  .specs-breakdown-list {
    padding: 8px !important;
    border-radius: 8px !important;
    margin-bottom: 0.85rem !important;
  }

  .specs-item {
    font-size: 0.78rem !important;
    padding: 5px 0 !important;
    gap: 6px !important;
  }

  .specs-item span {
    font-size: 0.76rem !important;
  }

  .specs-item strong {
    font-size: 0.78rem !important;
    word-break: break-word !important;
  }

  .price-disclaimer {
    font-size: 0.72rem !important;
    padding: 8px !important;
    border-radius: 6px !important;
    line-height: 1.5 !important;
  }

  .calc-trust-badge {
    padding: 6px 8px !important;
    gap: 4px !important;
    border-radius: 6px !important;
  }

  .trust-badge-item {
    font-size: 0.7rem !important;
    line-height: 1.35 !important;
  }

  .btn-primary-action {
    font-size: 0.86rem !important;
    padding: 11px 10px !important;
    width: 100% !important;
    border-radius: 8px !important;
    white-space: normal !important;
    line-height: 1.35 !important;
    text-align: center !important;
  }

  .btn-secondary-action {
    font-size: 0.82rem !important;
    padding: 9px 8px !important;
    width: 100% !important;
    border-radius: 8px !important;
    white-space: normal !important;
    line-height: 1.35 !important;
    text-align: center !important;
  }

  /* Modals on 340-480px */
  .modal-dialog {
    width: 95% !important;
    max-width: 95% !important;
    margin: 6px auto !important;
    border-radius: 10px !important;
  }

  .modal-head {
    padding: 8px 10px !important;
  }

  .modal-title {
    font-size: 0.92rem !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    text-align: center !important;
  }

  .modal-close-btn {
    width: 30px !important;
    height: 30px !important;
    font-size: 1.1rem !important;
  }

  .modal-body {
    padding: 10px 8px !important;
  }

  .modal-foot {
    padding: 8px 10px !important;
    flex-direction: column-reverse !important;
    gap: 6px !important;
  }

  .modal-foot .btn-primary-action,
  .modal-foot .btn-secondary-action {
    width: 100% !important;
    height: 38px !important;
    font-size: 0.84rem !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .success-modal-dialog {
    width: 95% !important;
    max-width: 95% !important;
    margin: 6px auto !important;
    border-radius: 10px !important;
  }

  .tracking-code-val {
    font-size: 1.15rem !important;
    text-align: center !important;
  }

  .success-specs-summary {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  /* Section Headers - Centered & Compact */
  .section-head {
    text-align: center !important;
    margin-bottom: 1.3rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .section-tag {
    font-size: 0.68rem !important;
    padding: 3px 10px !important;
    margin: 0 auto 0.35rem auto !important;
    text-align: center !important;
    display: inline-block !important;
  }

  .section-title {
    font-size: 1.15rem !important;
    line-height: 1.35 !important;
    margin-bottom: 0.35rem !important;
    text-align: center !important;
  }

  .section-desc {
    font-size: 0.74rem !important;
    line-height: 1.5 !important;
    text-align: center !important;
    margin: 0 auto !important;
    max-width: 94% !important;
  }

  /* Features Grid - Centered & Compact */
  .features-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .feature-box {
    padding: 1rem 0.8rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 10px !important;
  }

  .feature-icon-wrap {
    width: 40px !important;
    height: 40px !important;
    margin: 0 auto 0.5rem auto !important;
  }

  .feature-icon-wrap svg {
    width: 20px !important;
    height: 20px !important;
  }

  .feature-title {
    font-size: 0.88rem !important;
    text-align: center !important;
    margin-bottom: 0.25rem !important;
  }

  .feature-text {
    font-size: 0.74rem !important;
    text-align: center !important;
    line-height: 1.5 !important;
  }

  /* Specs Table Card - No Horizontal Scroll */
  .specs-table-card {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .table-responsive {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  /* Production Process - Centered & Compact */
  .process-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .process-card {
    padding: 1rem 0.8rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 10px !important;
  }

  .step-number {
    font-size: 1.5rem !important;
    margin: 0 auto 0.3rem auto !important;
    text-align: center !important;
  }

  .step-title {
    font-size: 0.88rem !important;
    white-space: normal !important;
    text-align: center !important;
    margin-bottom: 0.25rem !important;
  }

  .step-desc {
    font-size: 0.73rem !important;
    text-align: center !important;
    line-height: 1.5 !important;
  }

  /* Showcase Gallery - Centered & Compact */
  .showcase-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .showcase-img {
    height: 175px !important;
  }

  .showcase-overlay-tag {
    font-size: 0.68rem !important;
    padding: 4px 10px !important;
    right: 8px !important;
    bottom: 8px !important;
    text-align: center !important;
  }

  /* FAQ List - Mobile Sealed & Premium */
  .faq-list {
    gap: 0.55rem !important;
  }

  .faq-item {
    border-radius: 10px !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
  }

  .faq-question {
    padding: 11px 12px !important;
    font-size: 0.82rem !important;
    gap: 10px !important;
    line-height: 1.4 !important;
  }

  .faq-icon {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.75rem !important;
    flex-shrink: 0 !important;
  }

  .faq-icon svg {
    width: 12px !important;
    height: 12px !important;
  }

  /* CRITICAL: Absolutely 0 padding, height, opacity and visibility when closed */
  .faq-answer {
    max-height: 0 !important;
    padding: 0 12px !important;
    margin: 0 !important;
    border-top: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    overflow: hidden !important;
    font-size: 0.75rem !important;
    line-height: 1.6 !important;
  }

  /* Smooth expansion with full visibility and text padding when open */
  .faq-item.open .faq-answer {
    max-height: 1000px !important;
    padding: 8px 12px 12px 12px !important;
    opacity: 1 !important;
    visibility: visible !important;
    border-top: 1px dashed rgba(16, 185, 129, 0.22) !important;
  }

  /* Contact & Consultation section - Centered & Compact */
  .contact-section-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .contact-info-card, .contact-form-card {
    padding: 1rem 0.8rem !important;
    border-radius: 10px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  .contact-card-head {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    margin-bottom: 0.5rem !important;
    text-align: center !important;
  }

  .contact-card-icon {
    width: 36px !important;
    height: 36px !important;
    margin: 0 auto !important;
  }

  .contact-card-title {
    font-size: 0.98rem !important;
    text-align: center !important;
  }

  .contact-card-sub {
    font-size: 0.74rem !important;
    text-align: center !important;
    margin-bottom: 0.85rem !important;
    line-height: 1.5 !important;
  }

  .contact-direct-phone-val {
    font-size: 1.05rem !important;
  }

  .contact-detail-row {
    width: 100% !important;
    padding: 8px 10px !important;
    margin-bottom: 7px !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .contact-detail-text {
    font-size: 0.75rem !important;
    text-align: right !important;
  }

  .contact-detail-label {
    font-size: 0.67rem !important;
  }

  .contact-detail-val {
    font-size: 0.77rem !important;
  }

  .contact-form-group {
    width: 100% !important;
    gap: 4px !important;
    margin-bottom: 0.75rem !important;
  }

  .contact-label {
    font-size: 0.75rem !important;
  }

  .contact-input-field {
    padding: 8px 10px !important;
    font-size: 0.8rem !important;
    border-radius: 8px !important;
  }

  .contact-textarea-field {
    min-height: 70px !important;
  }

  .contact-submit-btn {
    width: 100% !important;
    padding: 10px 14px !important;
    font-size: 0.86rem !important;
    border-radius: 8px !important;
    justify-content: center !important;
  }

  /* Footer on 340-480px - Centered & Compact */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 1.1rem !important;
    padding: 1.5rem 0 1rem 0 !important;
    text-align: center !important;
  }

  .footer-grid > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .footer-grid .brand-wrapper {
    justify-content: center !important;
    margin: 0 auto 0.5rem auto !important;
  }

  .footer-col-desc {
    font-size: 0.72rem !important;
    line-height: 1.5 !important;
    text-align: center !important;
  }

  .footer-heading {
    font-size: 0.85rem !important;
    white-space: normal !important;
    text-align: center !important;
    margin-bottom: 0.4rem !important;
  }

  .footer-links {
    align-items: center !important;
    text-align: center !important;
    gap: 5px !important;
  }

  .footer-links li a {
    font-size: 0.74rem !important;
    text-align: center !important;
  }

  .footer-contact-item {
    font-size: 0.75rem !important;
    white-space: normal !important;
    text-align: center !important;
  }

  .footer-bottom {
    font-size: 0.68rem !important;
    padding-top: 0.9rem !important;
    text-align: center !important;
  }

  /* Custom Dropdowns on Mobile Phones */
  .custom-select-wrapper {
    width: 100% !important;
  }
  .custom-select-wrapper.is-open {
    z-index: 60 !important;
  }
  .custom-select-trigger {
    min-height: 38px !important;
    height: 38px !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    gap: 8px !important;
  }
  .custom-select-trigger-content {
    min-width: 0 !important;
    flex: 1 !important;
  }
  .custom-select-placeholder,
  .custom-select-selected-title {
    font-size: 0.81rem !important;
    line-height: 1.25 !important;
  }
  .custom-select-selected-val {
    gap: 6px !important;
    min-width: 0 !important;
    flex: 1 !important;
  }
  .custom-select-selected-title {
    min-width: 0 !important;
    flex: 1 !important;
  }
  .custom-select-arrow {
    flex-shrink: 0 !important;
  }
  .custom-select-arrow svg {
    width: 15px !important;
    height: 15px !important;
  }
  .custom-select-menu {
    top: calc(100% + 4px) !important;
    max-height: 220px !important;
    padding: 5px !important;
    border-radius: 8px !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8) !important;
  }
  .custom-select-option {
    padding: 7px 8px !important;
    border-radius: 6px !important;
    margin-bottom: 3px !important;
    gap: 6px !important;
  }
  .custom-select-option:hover:not(.is-disabled) {
    transform: none !important;
  }
  .custom-select-option-main {
    gap: 7px !important;
    min-width: 0 !important;
    flex: 1 !important;
  }
  .custom-select-option-text {
    gap: 1px !important;
    min-width: 0 !important;
    flex: 1 !important;
  }
  .custom-select-option-title {
    font-size: 0.79rem !important;
    line-height: 1.3 !important;
  }
  .custom-select-option-sub {
    font-size: 0.68rem !important;
    line-height: 1.3 !important;
  }
  .custom-select-option-badge {
    font-size: 0.64rem !important;
    padding: 2px 5px !important;
    margin-left: 2px !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
  }
  .custom-select-option-check {
    margin-right: 4px !important;
    flex-shrink: 0 !important;
  }
  .custom-select-option-check svg {
    width: 13px !important;
    height: 13px !important;
  }
  .custom-select-color-indicator {
    width: 11px !important;
    height: 11px !important;
    flex-shrink: 0 !important;
  }

  /* Toast Notifications on Mobile Phones */
  .toast-container {
    bottom: 14px !important;
    left: 10px !important;
    right: 10px !important;
    margin: 0 auto !important;
    width: auto !important;
    max-width: calc(100vw - 20px) !important;
    align-items: center !important;
    gap: 6px !important;
    pointer-events: none !important;
    z-index: 9999 !important;
  }
  .toast {
    pointer-events: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px 12px !important;
    font-size: 0.79rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.45 !important;
    gap: 8px !important;
    justify-content: flex-start !important;
    text-align: right !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55) !important;
    box-sizing: border-box !important;
  }
  .toast > span {
    flex: 1 !important;
    min-width: 0 !important;
    line-height: 1.45 !important;
  }

  /* Auto-Detection Notice Box & Dimension Hints on Mobile */
  .dimension-auto-notice {
    padding: 8px 10px !important;
    font-size: 0.75rem !important;
    gap: 8px !important;
    line-height: 1.5 !important;
    border-radius: 8px !important;
    margin-bottom: 0.85rem !important;
  }
  .dimension-auto-notice .notice-icon svg {
    width: 15px !important;
    height: 15px !important;
  }
  .dim-extracted-hint {
    padding: 6px 10px !important;
    font-size: 0.73rem !important;
    gap: 6px !important;
    line-height: 1.4 !important;
    border-radius: 6px !important;
    margin-top: -0.4rem !important;
    margin-bottom: 0.85rem !important;
  }
  .dim-extracted-hint svg {
    width: 14px !important;
    height: 14px !important;
  }
}

/* Extra tight smartphones (<= 360px down to 340px) */
@media (max-width: 360px) {
  .container {
    padding: 0 6px !important;
  }

  .nav-inner {
    padding: 0 2px !important;
  }

  .brand-name {
    font-size: 0.85rem !important;
  }

  .brand-logo-img {
    width: 28px !important;
    height: 28px !important;
  }

  .btn-header-phone,
  .theme-toggle-btn,
  .mobile-menu-btn {
    width: 30px !important;
    height: 30px !important;
  }

  .hero-title {
    font-size: 1.15rem !important;
  }

  .hero-subtitle {
    font-size: 0.72rem !important;
  }

  .calc-form-area, .calc-summary-area {
    padding: 0.65rem 0.45rem !important;
  }

  .pill-card {
    padding: 5px 2px !important;
    min-height: 44px !important;
  }

  .pill-title {
    font-size: 0.72rem !important;
  }

  .pill-desc {
    font-size: 0.6rem !important;
  }

  .swatch-group {
    grid-template-columns: 1fr !important;
  }

  .section-title {
    font-size: 1.05rem !important;
  }

  .section-desc {
    font-size: 0.7rem !important;
  }

  /* Small Mobile Dropdowns */
  .form-input, .form-select {
    height: 35px !important;
    padding: 6px 8px !important;
    font-size: 0.78rem !important;
  }
  .custom-select-trigger {
    min-height: 35px !important;
    height: 35px !important;
    padding: 5px 8px !important;
    border-radius: 7px !important;
    gap: 6px !important;
  }
  .custom-select-placeholder,
  .custom-select-selected-title {
    font-size: 0.76rem !important;
    line-height: 1.2 !important;
  }
  .custom-select-arrow svg {
    width: 13px !important;
    height: 13px !important;
  }
  .custom-select-menu {
    max-height: 190px !important;
    padding: 4px !important;
    border-radius: 7px !important;
  }
  .custom-select-option {
    padding: 5px 6px !important;
    gap: 5px !important;
    border-radius: 5px !important;
  }
  .custom-select-option-main {
    gap: 5px !important;
  }
  .custom-select-option-title {
    font-size: 0.73rem !important;
  }
  .custom-select-option-sub {
    font-size: 0.63rem !important;
    line-height: 1.25 !important;
  }
  .custom-select-option-badge {
    font-size: 0.58rem !important;
    padding: 1px 4px !important;
    margin-left: 2px !important;
  }
  .custom-select-color-indicator {
    width: 9px !important;
    height: 9px !important;
  }

  /* Small Mobile Toast Notifications */
  .toast-container {
    bottom: 10px !important;
    left: 6px !important;
    right: 6px !important;
    gap: 5px !important;
    max-width: calc(100vw - 12px) !important;
  }
  .toast {
    padding: 7px 9px !important;
    font-size: 0.74rem !important;
    border-radius: 6px !important;
    line-height: 1.4 !important;
    gap: 6px !important;
  }

  /* Auto-Detection Notice Box & Dimension Hints on Small Mobile */
  .dimension-auto-notice {
    padding: 6px 8px !important;
    font-size: 0.70rem !important;
    gap: 6px !important;
    line-height: 1.45 !important;
  }
  .dim-extracted-hint {
    padding: 5px 8px !important;
    font-size: 0.69rem !important;
    gap: 5px !important;
    line-height: 1.35 !important;
  }
}

/* ==========================================================================
   Advanced Order Success Modal (Option 1 - Industrial High Polish)
   ========================================================================== */
.success-modal-dialog {
  max-width: 620px;
  max-height: 94vh;
  overflow-y: auto;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(16, 185, 129, 0.22);
}

.success-modal-head {
  padding: 1.2rem 1.6rem;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 23, 42, 0) 100%), var(--bg-card);
}

.success-badge-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.success-icon-pulse {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
  animation: successIconPulse 2.4s infinite ease-in-out;
}

@keyframes successIconPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(16, 185, 129, 0.35); }
  50% { transform: scale(1.06); box-shadow: 0 0 32px rgba(16, 185, 129, 0.6); }
}

.success-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
}

.success-modal-body {
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

/* Tracking Card */
.success-tracking-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.09) 0%, rgba(2, 6, 23, 0.6) 100%);
  border: 1px dashed rgba(16, 185, 129, 0.5);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.tracking-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.tracking-card-label {
  font-size: 0.86rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.tracking-card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 700;
}

.status-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 1.6s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.tracking-code-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}

.tracking-code-val {
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: 2.5px;
  color: #10b981;
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
  user-select: all;
}

.btn-copy-tracking {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-copy-tracking:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: #10b981;
  color: #10b981;
}

.tracking-card-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 6px;
}

/* Specs Summary */
.success-specs-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.spec-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-pill .pill-title {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.spec-pill strong {
  color: var(--text-primary);
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Timeline */
.success-timeline-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.timeline-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.timeline-title svg {
  color: var(--color-primary-light);
}

.success-steps-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.step-item.active {
  background: rgba(16, 185, 129, 0.07);
  border-color: rgba(16, 185, 129, 0.28);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-item.active .step-num {
  background: #10b981;
  color: #020617;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

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

.step-info strong {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.step-item.active .step-info strong {
  color: #34d399;
}

.step-info span {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Actions Grid */
.success-actions-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 10px;
  margin-top: 2px;
}

.btn-success-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
  transition: all var(--transition-fast);
}

.btn-success-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(16, 185, 129, 0.5);
  filter: brightness(1.08);
}

.btn-success-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color-hover);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-success-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-primary-light);
  color: var(--color-primary-light);
}

.success-modal-foot {
  padding: 0.9rem 1.6rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
}

.btn-close-subtle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.83rem;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.btn-close-subtle:hover {
  color: var(--text-secondary);
  text-decoration: underline;
}

@media (max-width: 600px) {
  .success-specs-summary {
    grid-template-columns: 1fr 1fr;
  }
  .success-actions-grid {
    grid-template-columns: 1fr;
  }
  .tracking-code-val {
    font-size: 1.35rem;
  }
}

/* ==========================================================================
   Contact & Consultation Section (High-Tech Industrial Redesign)
   ========================================================================== */
.contact-section-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 2.2rem;
  align-items: stretch;
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 880px) {
  .contact-section-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
}

.contact-info-card,
.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.contact-info-card::before,
.contact-form-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981 0%, #059669 60%, transparent 100%);
}

.contact-info-card:hover,
.contact-form-card:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-lg), 0 0 30px var(--color-primary-glow);
}

.contact-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 0.8rem;
}

.contact-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-light);
  flex-shrink: 0;
}

.contact-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.contact-card-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Form Groups & Inputs */
.contact-form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 1.1rem;
  text-align: right;
}

.contact-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #cbd5e1;
}

.contact-label svg {
  color: var(--color-primary-light);
  flex-shrink: 0;
}

.contact-input-field {
  width: 100%;
  background: rgba(10, 15, 13, 0.88);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.94rem;
  direction: rtl;
  text-align: right;
  transition: all var(--transition-fast);
  outline: none;
  box-sizing: border-box;
}

.contact-input-field:focus {
  border-color: #10b981;
  background: rgba(13, 21, 17, 0.95);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.32), inset 0 0 8px rgba(16, 185, 129, 0.1);
}

.contact-input-field::placeholder {
  color: #64748b;
  font-size: 0.88rem;
}

.contact-textarea-field {
  resize: vertical;
  min-height: 105px;
  line-height: 1.7;
}

.contact-submit-btn {
  width: 100%;
  padding: 14px 22px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
  transition: all var(--transition-fast);
  margin-top: 6px;
}

.contact-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
}

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

/* Office details rows */
.contact-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  margin-bottom: 11px;
  transition: all var(--transition-fast);
}

.contact-detail-row:hover {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.2);
}

.contact-detail-icon {
  color: var(--color-primary-light);
  margin-top: 2px;
  flex-shrink: 0;
}

.contact-detail-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.86rem;
  text-align: right;
}

.contact-detail-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.contact-detail-val {
  color: var(--text-main);
  font-weight: 700;
  text-decoration: none;
}

.contact-detail-val:hover {
  color: var(--color-primary-light);
}

/* ==========================================================================
   Order CTA Improvements & Final Step Action Card
   ========================================================================== */

/* Pulsing Dot Indicator */
.pulsing-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseDotAnim 2s infinite;
  flex-shrink: 0;
}

@keyframes pulseDotAnim {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Embedded Final Step Action Card (Bottom of Step 4) */
.calc-final-action-card {
  margin-top: 28px;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 78, 59, 0.15) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .calc-final-action-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.08);
}

.final-action-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 10px;
}

.final-action-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.4;
}

.final-action-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.final-action-btn-wrapper {
  margin-bottom: 16px;
}

.btn-final-order {
  font-size: 1.08rem;
  padding: 16px 26px;
  font-weight: 900;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.35);
  margin-bottom: 0;
}

.btn-final-order:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(16, 185, 129, 0.5);
}

.final-action-guarantee {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .final-action-guarantee {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.guarantee-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.guarantee-pill svg {
  color: #10b981;
  flex-shrink: 0;
}

/* Sidebar Actions Enhancements */
.calc-sidebar-actions {
  display: flex;
  flex-direction: column;
}

.sidebar-action-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 8px;
}

.btn-sidebar-order {
  font-size: 1rem;
  padding: 15px 20px;
  font-weight: 900;
  margin-bottom: 0;
}

.action-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 10px 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.action-divider::before,
.action-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.action-divider span {
  padding: 0 10px;
  font-weight: 600;
}

/* Sticky Mobile Order CTA Bar */
.calc-mobile-sticky-bar {
  display: none;
}

@media (max-width: 991px) {
  /* In mobile, hide duplicate sidebar buttons to keep bottom of page completely clean and uncluttered */
  .calc-sidebar-actions {
    display: none !important;
  }

  .calc-mobile-sticky-bar {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 998;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(16, 185, 129, 0.35);
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.35);
    padding: 10px 16px;
    transform: translateY(110%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .calc-mobile-sticky-bar.visible {
    transform: translateY(0);
  }

  [data-theme="light"] .calc-mobile-sticky-bar {
    background: rgba(255, 255, 255, 0.94);
    border-top-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  }

  .mobile-sticky-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
  }

  .mobile-sticky-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .mobile-sticky-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #10b981;
  }

  .mobile-sticky-subtext {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.3;
  }

  .btn-mobile-order-trigger {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 10px 20px;
    font-size: 0.92rem;
    font-weight: 800;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    white-space: nowrap;
    transition: transform var(--transition-fast);
  }

  .btn-mobile-order-trigger:active {
    transform: scale(0.97);
  }
}

/* ==========================================================================
   Order Validation & File Requirement States
   ========================================================================== */

/* Locked state when file is not yet uploaded */
.btn-primary-action.btn-file-locked {
  background: linear-gradient(135deg, #475569 0%, #334155 100%) !important;
  color: #e2e8f0 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  position: relative;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.btn-primary-action.btn-file-locked:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
}

/* Pulsating outline animation when required field or file dropzone is missing */
@keyframes fieldMissingPulseAnim {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    border-color: #ef4444;
  }
  50% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    border-color: #f87171;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    border-color: #ef4444;
  }
}

.field-missing-error {
  animation: fieldMissingPulseAnim 1.1s ease-in-out 3 !important;
  border-color: #ef4444 !important;
  outline: 2px solid #ef4444 !important;
  border-radius: var(--radius-sm);
}

.upload-dropzone.field-missing-error {
  background: rgba(239, 68, 68, 0.08) !important;
  border-color: #ef4444 !important;
}

/* Material panel empty placeholder hint */
.material-panel-empty-hint {
  font-size: 0.84rem;
  color: var(--text-muted);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  text-align: center;
  margin-top: 6px;
}

/* Dimension Auto-Detection Pre-selection Notice Box */
.dimension-auto-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(30, 58, 138, 0.22);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 1.3rem;
  color: #bfdbfe;
  font-size: 0.84rem;
  line-height: 1.65;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.dimension-auto-notice .notice-icon {
  color: #60a5fa;
  flex-shrink: 0;
  margin-top: 2px;
}

.dimension-auto-notice .notice-content strong {
  color: #ffffff;
}

/* Input with unit badge */
.input-with-unit {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-unit .form-input {
  width: 100%;
  padding-left: 48px !important;
}

.input-unit-label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
  pointer-events: none;
  font-family: 'Outfit', var(--font-fa);
  opacity: 0.85;
}

/* Post-extraction hint banner */
.dim-extracted-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  margin-top: -0.6rem;
  margin-bottom: 1.2rem;
  animation: fadeIn 0.3s ease;
  line-height: 1.5;
}

.dim-extracted-hint svg {
  flex-shrink: 0;
  color: #10b981;
}

/* ==========================================================================
   Premium Dark Glassmorphic Custom Dropdown (Select) Component
   ========================================================================== */

/* Visually hide native select while preserving full DOM & accessibility */
.visually-hidden-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Custom Select Container */
.custom-select-wrapper {
  position: relative;
  width: 100%;
  font-family: inherit;
  user-select: none;
}

/* Trigger Button */
.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(18, 24, 38, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  min-height: 48px;
}

.custom-select-trigger:hover {
  background: rgba(24, 32, 50, 0.95);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.18);
  transform: translateY(-1px);
}

.custom-select-wrapper.is-open .custom-select-trigger {
  border-color: #3b82f6;
  background: rgba(26, 36, 56, 0.98);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.custom-select-trigger-content {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.custom-select-placeholder {
  color: var(--text-muted, #94a3b8);
  font-size: 0.92rem;
}

.custom-select-selected-val {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.custom-select-selected-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-select-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
  flex-shrink: 0;
}

.custom-select-wrapper.is-open .custom-select-arrow {
  transform: rotate(180deg);
  color: #3b82f6;
}

/* Floating Dropdown Menu */
.custom-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 999;
  background: #0d1527;
  background: linear-gradient(180deg, #0f1a30 0%, #0b1222 100%);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(59, 130, 246, 0.15);
  backdrop-filter: blur(20px);
  max-height: 320px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.98);
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.22s;
}

.custom-select-wrapper.is-open .custom-select-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.custom-select-menu::-webkit-scrollbar {
  width: 6px;
}
.custom-select-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}
.custom-select-menu::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.4);
  border-radius: 4px;
}
.custom-select-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.7);
}

/* Option Cards inside menu */
.custom-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.custom-select-option:last-child {
  margin-bottom: 0;
}

.custom-select-option:hover:not(.is-disabled) {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
  transform: translateX(-4px);
}

.custom-select-option.is-selected {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25) 0%, rgba(30, 58, 138, 0.4) 100%);
  border-color: rgba(59, 130, 246, 0.55);
}

.custom-select-option.is-selected .custom-select-option-title {
  color: #60a5fa;
  font-weight: 700;
}

.custom-select-option.is-selected .custom-select-option-check {
  opacity: 1;
  transform: scale(1);
}

.custom-select-option.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

.custom-select-option-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.custom-select-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.custom-select-option-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f1f5f9;
}

.custom-select-option-sub {
  font-size: 0.77rem;
  color: #94a3b8;
  line-height: 1.4;
}

.custom-select-option-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  margin-left: 8px;
}

.custom-select-option-badge.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.custom-select-option-badge.badge-gold {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.custom-select-option-badge.badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.custom-select-option-badge.badge-disabled {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.custom-select-option-badge.mini-badge {
  font-size: 0.68rem;
  padding: 2px 7px;
  margin-right: 6px;
}

.custom-select-option-check {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-right: 8px;
  flex-shrink: 0;
}

/* Indicators */
.custom-select-color-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}

.custom-select-color-indicator.copper-18 {
  background: #d97706;
  color: #f59e0b;
}

.custom-select-color-indicator.copper-35 {
  background: #ea580c;
  color: #f97316;
}

.custom-select-color-indicator.copper-70 {
  background: #b45309;
  color: #d97706;
}

.custom-select-color-indicator.finish-raw {
  background: #d97706;
  color: #f59e0b;
}

.custom-select-color-indicator.finish-hasl {
  background: #94a3b8;
  color: #cbd5e1;
}

.custom-select-color-indicator.speed-normal {
  background: #10b981;
  color: #34d399;
}

.custom-select-color-indicator.speed-express {
  background: #3b82f6;
  color: #60a5fa;
}

.custom-select-color-indicator.speed-urgent {
  background: #f59e0b;
  color: #fbbf24;
}

.custom-select-color-indicator.default-indicator {
  background: #64748b;
  color: #94a3b8;
}

/* Missing Field Animation on custom select wrapper */
.custom-select-wrapper.field-missing-error .custom-select-trigger {
  animation: fieldMissingPulseAnim 1.1s ease-in-out 3 !important;
  border-color: #ef4444 !important;
  outline: 2px solid #ef4444 !important;
}
