/**
 * Custom 3D Box & Partition Designer Stylesheet
 * PT Sugi Harti Indonesia
 * Version: 2026.42 (Impraboard Box & Impraboard Partition Modules)
 */

:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --card-alt: #f1f5f9;
  --border: #e2e8f0;
  --accent: #002F6C;
  --accent-hover: #004d99;
  --accent-bright: #0088ff;
  --accent-glow: rgba(0, 47, 108, 0.12);
  --accent-gold: #FFB100;
  --accent-gold-hover: #e69e00;
  --accent-kraft: #b88d55;
  --text: #1e293b;
  --text-dim: #64748b;
  --text-bright: #002F6C;
  --radius: 14px;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 25px rgba(0, 47, 108, 0.08);
}

/* ==============================================================
   1. HERO BANNER
   ============================================================== */
.design3d-hero {
  position: relative;
  background: linear-gradient(135deg, #001f4d 0%, #002F6C 60%, #004d99 100%);
  color: #ffffff;
  padding: 85px 0 75px;
  overflow: hidden;
  z-index: 1;
}

.design3d-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 15% 25%, rgba(255, 177, 0, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(0, 136, 255, 0.2) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

.design3d-hero-grid-pattern {
  position: absolute;
  inset: 0;
  background-size: 36px 36px;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  z-index: -1;
  pointer-events: none;
}

.design3d-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FFB100;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 18px;
}

.design3d-hero h1 {
  font-size: clamp(2rem, 3.5vw, 2.9rem);
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.design3d-hero h1 span.text-highlight {
  color: #FFB100;
  position: relative;
  display: inline-block;
}

.design3d-hero p.lead {
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.88);
  max-width: 760px;
  margin: 0 auto 28px;
  line-height: 1.65;
}

.design3d-hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-cta-gold {
  background: linear-gradient(135deg, #FFB100 0%, #e69e00 100%);
  color: #001f4d;
  font-weight: 700;
  font-size: 14.5px;
  padding: 12px 26px;
  border-radius: 50px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 16px rgba(255, 177, 0, 0.35);
}

.btn-cta-gold:hover {
  background: linear-gradient(135deg, #ffbe26 0%, #ffb100 100%);
  color: #001f4d;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 177, 0, 0.5);
}

.btn-cta-outline {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  font-weight: 600;
  font-size: 14.5px;
  padding: 12px 24px;
  border-radius: 50px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: all 0.3s ease;
}

.btn-cta-outline:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-color: #ffffff;
  transform: translateY(-2px);
}

.design3d-hero-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 24px;
}

.design3d-hero-breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s ease;
}

.design3d-hero-breadcrumb a:hover {
  color: #FFB100;
}

/* ==============================================================
   2. WORKFLOW STEPS GUIDE BAR
   ============================================================== */
.design3d-steps-bar {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 24px 0;
  position: relative;
  z-index: 2;
}

.step-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: all 0.25s ease;
  height: 100%;
}

.step-card:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: 0 8px 20px rgba(0, 47, 108, 0.08);
}

.step-card .step-num {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #002F6C;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
}

.step-card .step-body h5 {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 2px;
}

.step-card .step-body p {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  line-height: 1.35;
}

/* ==============================================================
   3. 3D APPLICATION WORKSPACE
   ============================================================== */
.app,
.controls,
.dimension-input,
.type-tabs,
.spec-summary {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 16px 60px;
}

.app-header {
  text-align: center;
  margin-bottom: 28px;
}

.app-header h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 800;
  color: #002F6C;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.app-header h2 span {
  color: #FFB100;
}

.app-header p {
  color: #64748b;
  font-size: clamp(0.85rem, 1.1vw, 0.95rem);
  max-width: 720px;
  margin: 0 auto;
}

/* Mode Switcher Tabs (Box Impraboard | Partisi Impraboard Saja) */
.type-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 50px;
  padding: 6px;
  margin: 0 auto 26px;
  max-width: 540px;
  gap: 6px;
  box-shadow: 0 4px 18px rgba(0, 47, 108, 0.06);
}

.type-tab {
  height: 44px;
  border: none;
  border-radius: 50px;
  background: transparent;
  color: #475569;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.type-tab:hover {
  color: #002F6C;
  background: rgba(0, 47, 108, 0.05);
}

.type-tab.active {
  background: linear-gradient(135deg, #002F6C 0%, #004d99 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 47, 108, 0.28);
}

.type-tab.active i {
  color: #FFB100;
}

/* Controls Container */
.controls {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 24px 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.section-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #002F6C;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 20px 0 12px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.section-label i {
  color: #FFB100;
  font-size: 13px;
}

/* Dimension Inputs Dedicated 3-Column Grid */
.dim-inputs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  background: #f8fafc;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  width: 100%;
  box-sizing: border-box;
}

.dim-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.dim-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #002F6C;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  display: flex;
  align-items: center;
}

.dim-input-group {
  display: flex;
  align-items: stretch;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  height: 44px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dim-input-group:focus-within {
  border-color: #002F6C;
  box-shadow: 0 0 0 3px rgba(0, 47, 108, 0.12);
}

.dim-input-group input {
  flex: 1 1 0%;
  min-width: 0;
  width: 0;
  border: none !important;
  background: transparent !important;
  padding: 0 10px !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  color: #002F6C;
  height: 100%;
  outline: none !important;
  box-shadow: none !important;
  -moz-appearance: textfield;
}

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

.dim-input-group .dim-unit {
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid #e2e8f0;
  user-select: none;
  flex-shrink: 0;
}

/* Secondary Parameters Grid */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

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

.cg-span-2 {
  grid-column: span 2;
}

.cg-full-divider {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed #cbd5e1;
}

.cg-full-divider label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #002F6C;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
}

.cg label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Polished Modern Custom Dropdown */
.cg select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23002F6C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 13px;
  padding: 10px 38px 10px 14px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  min-height: 44px;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.cg select:hover {
  border-color: #94a3b8;
  background-color: #f8fafc;
}

.cg select:focus {
  border-color: #002F6C;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 47, 108, 0.12);
  outline: none;
}

/* Polished Modern Inputs */
.cg input[type="text"],
.cg input[type="number"],
.cg input[type="file"] {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  min-height: 44px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.cg input[type="text"]:hover,
.cg input[type="number"]:hover {
  border-color: #94a3b8;
}

.cg input[type="text"]:focus,
.cg input[type="number"]:focus {
  border-color: #002F6C;
  box-shadow: 0 0 0 3px rgba(0, 47, 108, 0.12);
}

/* Strict Visibility Control for Specialized Fields */
.partition-fields,
.kanban-fields,
.lid-field,
.partition-only-fields,
.impra-fields,
.preset-btn.impra-fields,
.preset-btn.partition-only-fields {
  display: none !important;
}

.partition-fields.show,
.kanban-fields.show,
.lid-field.show,
.partition-only-fields.show,
.impra-fields.show {
  display: flex !important;
}

/* Hardware Section Container (matches regular block section) */
#section-hardware,
.hardware-section {
  width: 100%;
}

#section-hardware.show,
.hardware-section.show {
  display: block !important;
}

.preset-btn.impra-fields.show,
.preset-btn.partition-only-fields.show {
  display: inline-flex !important;
}

/* Subfield Container for Box Inset Partition */
.box-partition-subfields {
  background: #f8fafc;
  border: 1.5px dashed #93c5fd;
  border-radius: 12px;
  padding: 16px 18px;
  margin-top: 6px;
  animation: fadeUp 0.25s ease;
}

.box-part-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.bph-title {
  font-size: 13px;
  font-weight: 700;
  color: #002F6C;
}

.bph-badge {
  font-size: 11px;
  font-weight: 600;
  color: #0284c7;
  background: #e0f2fe;
  padding: 3px 10px;
  border-radius: 20px;
}

.box-part-inner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Live Cell Dimension Callout Box (Partisi Saja) */
.cell-preview-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1.5px solid #86efac;
  border-radius: 12px;
  padding: 14px 18px;
  display: none !important;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 6px;
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.08);
}

.cell-preview-card.show {
  display: flex !important;
}

.cell-preview-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cell-preview-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #16a34a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(22, 163, 74, 0.25);
}

.cell-preview-text h6 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #14532d;
}

.cell-preview-text p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #166534;
  line-height: 1.35;
}

.cell-preview-badge {
  background: #15803d;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 50px;
  font-family: 'JetBrains Mono', monospace;
  box-shadow: 0 2px 8px rgba(21, 128, 61, 0.25);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Checkbox Items */
.cg-checkbox {
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  min-height: 44px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.cg-checkbox:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}

.cg-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #002F6C;
  cursor: pointer;
  margin: 0 !important;
  flex-shrink: 0;
}

.cg-checkbox label {
  cursor: pointer;
  margin: 0 !important;
  text-transform: none !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  letter-spacing: normal !important;
}

/* Logo Preview */
.logo-preview-box {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.logo-preview-box.show {
  display: flex;
}

.logo-preview-box img {
  max-height: 42px;
  max-width: 65px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 2px;
  background: #fff;
}

.logo-remove {
  padding: 5px 10px;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  background: #fef2f2;
  color: #dc2626;
  cursor: pointer;
  font-size: 0.75rem;
  transition: 0.2s;
}

.logo-remove:hover {
  background: #fee2e2;
}

/* Preset Recommendation Section */
.preset-wrapper {
  margin-top: 16px;
  padding: 14px 18px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preset-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.preset-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #002F6C;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 4px 12px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.preset-hint {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.preset-btn {
  padding: 7px 15px;
  border: 1px solid #cbd5e1;
  border-radius: 50px;
  background: #ffffff;
  color: #334155;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.preset-btn:hover {
  border-color: #002F6C;
  color: #002F6C;
  background: rgba(0, 47, 108, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 47, 108, 0.1);
}

.preset-btn.impra-fields.show,
.preset-btn.partition-only-fields.show {
  display: inline-flex !important;
}

/* Action Buttons Row */
.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  align-items: stretch;
}

.btn-generate {
  flex: 1.6;
  min-height: 48px;
  padding: 13px 22px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #002F6C 0%, #004d99 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 47, 108, 0.28);
  white-space: nowrap;
}

.btn-generate:hover {
  background: linear-gradient(135deg, #001f4d 0%, #002F6C 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 47, 108, 0.38);
}

.btn-secondary-group {
  flex: 1;
  display: flex;
  gap: 10px;
}

.btn-secondary {
  flex: 1;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-secondary:hover {
  border-color: #002F6C;
  color: #002F6C;
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.empty-state i {
  font-size: 3.2rem;
  color: #94a3b8;
  margin-bottom: 12px;
}

.empty-state h3 {
  color: #1e293b;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.empty-state p {
  color: #64748b;
  font-size: 13.5px;
}

/* ==============================================================
   4. PREVIEW AREA & 3D CANVAS
   ============================================================== */
.preview-area {
  display: none;
  margin-bottom: 24px;
  animation: fadeUp 0.4s ease;
}

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

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

#boxCanvas {
  width: 100%;
  height: clamp(380px, 60vw, 560px);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #dfe3ea, #eef1f5);
  border: 1px solid #cbd5e1;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
}

.canvas-live-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 15;
  background: rgba(0, 31, 77, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100% - 28px);
  white-space: nowrap;
}

.canvas-live-badge .badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25d366;
  display: inline-block;
  box-shadow: 0 0 8px #25d366;
  flex-shrink: 0;
}

.badge-text-group {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-sep {
  margin: 0 4px;
  color: rgba(255, 255, 255, 0.5);
}

.view-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: calc(100% - 220px);
}

.view-btn {
  height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #1e293b;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
}

.view-btn:hover,
.view-btn.active {
  background: #002F6C;
  color: #ffffff;
  border-color: #002F6C;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 47, 108, 0.25);
}

#btnExploded.active {
  background: linear-gradient(135deg, #002F6C 0%, #004b9e 100%);
  border-color: #FFB100;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 177, 0, 0.35);
}

#btnExploded.active i {
  color: #FFB100;
}

.view-btn.impra-fields {
  display: none;
}

.view-btn.impra-fields.show {
  display: inline-flex !important;
}

/* Fullscreen 3D Canvas */
#boxCanvas:fullscreen,
#boxCanvas:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #001f4d;
}

/* Hide branding section when in partition-only mode */
.branding-section.is-hidden {
  display: none !important;
}

/* ==============================================================
   Handling & Safety Symbol Chips (ISO Packaging Standard)
   ============================================================== */
.symbols-chips-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.symbol-chip {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.symbol-chip input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.symbol-chip .chip-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.symbol-chip:hover .chip-content {
  background: #f1f5f9;
  border-color: #002F6C;
  color: #002F6C;
  transform: translateY(-1px);
}

.symbol-chip input[type="checkbox"]:checked + .chip-content {
  background: linear-gradient(135deg, #002F6C 0%, #004b9e 100%);
  border-color: #002F6C;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 47, 108, 0.25);
  transform: translateY(-1px);
}

.symbol-chip input[type="checkbox"]:focus-visible + .chip-content {
  outline: 2px solid #004b9e;
  outline-offset: 2px;
}

.symbol-chip .chip-icon {
  font-size: 0.88rem;
  line-height: 1;
}

.symbol-chip .chip-label {
  letter-spacing: -0.01em;
}

/* ==============================================================
   5. BOQ PANEL & SPECIFICATIONS
   ============================================================== */
.boq-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 24px 22px;
  margin-top: 24px;
  box-shadow: var(--shadow-sm);
}

.boq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.boq-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #002F6C;
  display: flex;
  align-items: center;
  gap: 10px;
}

.boq-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #86efac;
  padding: 4px 12px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

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

@media (min-width: 768px) {
  .boq-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .boq-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.boq-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  transition: all 0.2s ease;
}

.boq-item:hover {
  border-color: #cbd5e1;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.boq-item-highlight {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #86efac;
}

.boq-item-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #166534;
  background: rgba(22, 101, 52, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  width: fit-content;
  margin-top: 2px;
}

.boq-label {
  font-size: 0.68rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.boq-value {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #002F6C;
  word-break: break-word;
}

.boq-value.highlight {
  color: #15803d;
}

.boq-item-price,
.boq-item-volume {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: #bae6fd;
}

.boq-item-volume .boq-value {
  color: #0369a1;
}

.boq-item-volume .boq-item-tag {
  color: #0284c7;
  background: rgba(2, 132, 199, 0.12);
}

.boq-item-payload {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border-color: #a7f3d0;
}

.boq-item-payload .boq-value {
  color: #059669;
}

.boq-item-payload .boq-item-tag {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
}

.boq-item-stacking {
  background: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 100%);
  border-color: #7dd3fc;
}

.boq-item-stacking .boq-value {
  color: #0284c7;
}

.boq-item-stacking .boq-item-tag {
  color: #0369a1;
  background: rgba(2, 132, 199, 0.12);
}

.boq-recommendation-alert {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  background: #eff6ff;
  border-left: 4px solid #0088ff;
  color: #1e3a8a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.boq-recommendation-alert.warning {
  background: #fffbeb;
  border-left-color: #f59e0b;
  color: #92400e;
}

.boq-recommendation-alert.success {
  background: #f0fdf4;
  border-left-color: #10b981;
  color: #065f46;
}

/* ==============================================================
   Logistics Pallet & Truck Calculator Module (BOQ)
   ============================================================== */
.boq-logistics-card {
  margin-top: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  position: relative;
  transition: all 0.25s ease;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.boq-logistics-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(0, 47, 108, 0.04);
}

.boq-logistics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.boq-logistics-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.boq-logistics-title i {
  font-size: 1.35rem;
  color: #FFB100;
  background: rgba(255, 177, 0, 0.12);
  padding: 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.boq-logistics-title h4 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #002F6C;
  line-height: 1.35;
  word-break: break-word;
}

.boq-logistics-title .sub-lead {
  display: block;
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 500;
  line-height: 1.35;
  word-break: break-word;
}

.logistics-tag {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 4px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}

.logistics-controls-grid {
  display: grid;
  grid-template-columns: 1.4fr 1.1fr 1.5fr;
  gap: 12px;
  margin-bottom: 16px;
  background: #ffffff;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 860px) {
  .boq-logistics-card {
    padding: 14px 12px !important;
  }

  .boq-logistics-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .boq-logistics-title {
    width: 100% !important;
  }

  .boq-logistics-title h4 {
    font-size: 0.92rem !important;
  }

  .logistics-controls-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 10px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .logistics-field {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .logistics-select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    font-size: 12px !important;
    padding: 8px 10px !important;
  }
}

.logistics-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.logistics-field label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logistics-select {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background-color: #f8fafc;
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  min-height: 40px;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  text-overflow: ellipsis;
}

.logistics-select:hover {
  border-color: #94a3b8;
  background-color: #ffffff;
}

.logistics-select:focus {
  border-color: #002F6C;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 47, 108, 0.1);
}

.logistics-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 768px) {
  .logistics-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.logistics-result-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.logistics-result-box.pallet-box {
  border-top: 3.5px solid #002F6C;
}

.logistics-result-box.truck-box {
  border-top: 3.5px solid #FFB100;
}

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

.lrb-header h5 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
}

.lrb-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  color: #002F6C;
  background: rgba(0, 47, 108, 0.08);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lrb-badge.truck {
  color: #92400e;
  background: rgba(245, 158, 11, 0.12);
}

.lrb-stat-primary {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 0 8px;
  border-bottom: 1px dashed #e2e8f0;
}

.lrb-stat-primary .stat-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.85rem;
  font-weight: 800;
  color: #002F6C;
  line-height: 1;
}

.logistics-result-box.truck-box .stat-number {
  color: #b45309;
}

.lrb-stat-primary .stat-unit {
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
}

.lrb-details-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
}

.lrb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lrb-row span {
  color: #64748b;
}

.lrb-row strong {
  color: #0f172a;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
}

.lrb-visual-hint {
  margin-top: 4px;
  font-size: 11.5px;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #e0f2fe;
  padding: 6px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
}

.lrb-status-pill {
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.lrb-status-pill.warning {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.lrb-status-pill.danger {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.boq-detail {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  font-size: 0.82rem;
}

.boq-detail .dl {
  color: #64748b;
}

.boq-detail .dv {
  color: #1e293b;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

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

/* ==============================================================
   6. EXPORT PANEL
   ============================================================== */
.export-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

@media (max-width: 991px) {
  .export-panel {
    grid-template-columns: repeat(2, 1fr);
  }
}

.btn-export {
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #1e293b;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  min-height: 46px;
  white-space: nowrap;
}

.btn-export:hover {
  border-color: #002F6C;
  color: #002F6C;
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.btn-export.primary {
  background: #002F6C;
  color: #ffffff;
  border-color: #002F6C;
  box-shadow: 0 4px 12px rgba(0, 47, 108, 0.2);
}

.btn-export.primary:hover {
  background: #001f4d;
  color: #ffffff;
}

.btn-export.btn-quote-cta {
  background: linear-gradient(135deg, #FFB100, #e69e00);
  color: #001f4d;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(255, 177, 0, 0.35);
}

.btn-export.btn-quote-cta:hover {
  background: linear-gradient(135deg, #ffbe26, #ffb100);
  color: #001f4d;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 177, 0, 0.45);
}

/* WhatsApp Consultation Button */
.btn-export.btn-boq-wa {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #ffffff !important;
  border: 1px solid #20BA5A;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.btn-export.btn-boq-wa i {
  font-size: 1.15rem;
  color: #ffffff !important;
}

.btn-export.btn-boq-wa:hover {
  background: linear-gradient(135deg, #2ae06d, #159c8d);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}

/* Share Link Button */
.btn-export.btn-boq-share {
  background: #ffffff;
  border: 1.5px solid #002F6C;
  color: #002F6C;
  font-weight: 700;
}

.btn-export.btn-boq-share:hover {
  background: rgba(0, 47, 108, 0.05);
  border-color: #001f4d;
  color: #001f4d;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 47, 108, 0.15);
}

/* ==============================================================
   7. CORPORATE CONSULTATION BOTTOM CTA SECTION
   ============================================================== */
.design3d-cta-section {
  padding: 70px 0;
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
}

.design3d-cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 47, 108, 0.08);
  color: #002F6C;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.design3d-cta-section h2 {
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
  font-weight: 800;
  color: #002F6C;
  margin-bottom: 14px;
}

.design3d-cta-section p.cta-lead {
  font-size: clamp(0.95rem, 1.15vw, 1.08rem);
  color: #475569;
  max-width: 720px;
  margin: 0 auto 30px;
  line-height: 1.65;
}

.cta-btn-group {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-cta-whatsapp {
  background: #25d366;
  color: #ffffff;
  font-weight: 700;
  font-size: 14.5px;
  padding: 12px 26px;
  border-radius: 50px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.btn-cta-whatsapp:hover {
  background: #1ebe57;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-cta-phone {
  background: #ffffff;
  color: #1e293b;
  font-weight: 600;
  font-size: 14.5px;
  padding: 12px 22px;
  border-radius: 50px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #cbd5e1;
  transition: all 0.25s ease;
}

.btn-cta-phone:hover {
  border-color: #002F6C;
  color: #002F6C;
  background: #f8fafc;
  transform: translateY(-2px);
}

/* ==============================================================
   8. TOAST NOTIFICATIONS
   ============================================================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: calc(100% - 40px);
}

.toast {
  padding: 12px 18px;
  border-radius: 10px;
  background: #ffffff;
  border-left: 4px solid #002F6C;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  color: #1e293b;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.25s ease;
  word-break: break-word;
}

.toast.success i {
  color: #25d366;
}

.toast.error i {
  color: #dc3545;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.out {
  animation: toastOut 0.25s ease forwards;
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

/* ==============================================================
   9. RESPONSIVE BREAKPOINTS (DESKTOP, TABLET, MOBILE)
   ============================================================== */

/* --- Tablet & Medium Screens (768px - 991px) --- */
@media (max-width: 991px) {
  .design3d-hero {
    padding: 65px 0 55px;
  }

  .design3d-hero h1 {
    font-size: 2.2rem;
  }

  .type-tabs {
    max-width: 500px;
  }

  .controls {
    padding: 20px 16px;
  }

  .controls-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cg-span-2 {
    grid-column: 1 / -1;
  }

  .btn-row {
    flex-direction: column;
    gap: 10px;
  }

  .btn-generate {
    width: 100%;
    min-height: 48px;
  }

  .btn-secondary-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 10px;
  }

  .btn-secondary {
    width: 100%;
  }

  .boq-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .export-panel {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .view-controls {
    position: absolute;
    top: auto;
    bottom: 12px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 580px;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 5px 8px;
    border-radius: 50px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.2);
    gap: 6px;
    z-index: 25;
    touch-action: pan-x;
  }

  .view-controls::-webkit-scrollbar {
    display: none;
  }

  .view-btn {
    flex: 0 0 auto;
    height: 33px;
    padding: 0 11px;
    font-size: 11px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95);
    color: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    gap: 4px;
  }

  .view-btn.active {
    background: linear-gradient(135deg, #002F6C, #0056b3);
    color: #ffffff;
    border-color: #002F6C;
  }

  .canvas-live-badge {
    top: 12px;
    left: 12px;
    font-size: 11.5px;
    padding: 5px 12px;
    max-width: 60%;
  }

  #canvasWatermark > div:last-child {
    top: 48px !important;
    bottom: auto !important;
    left: 12px !important;
    transform: scale(0.85);
    transform-origin: top left;
  }
}

/* --- Mobile Phones (<= 767px) --- */
@media (max-width: 767px) {
  .design3d-hero {
    padding: 48px 0 42px;
  }

  .design3d-hero-badge {
    font-size: 11.5px;
    padding: 5px 14px;
    max-width: 94%;
    line-height: 1.35;
    white-space: normal;
    text-align: center;
  }

  .design3d-hero h1 {
    font-size: 1.75rem;
    line-height: 1.28;
  }

  .design3d-hero p.lead {
    font-size: 0.92rem;
    margin-bottom: 22px;
  }

  .design3d-hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .design3d-hero-actions .btn-cta-gold,
  .design3d-hero-actions .btn-cta-outline {
    width: 100%;
    justify-content: center;
    font-size: 13.5px;
    padding: 11px 20px;
  }

  /* Workflow Steps on Mobile */
  .design3d-steps-bar {
    padding: 18px 0;
  }

  .step-card {
    padding: 10px 12px;
    gap: 10px;
    border-radius: 10px;
  }

  .step-card .step-num {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .step-card .step-body h5 {
    font-size: 12px;
  }

  .step-card .step-body p {
    font-size: 11px;
    line-height: 1.25;
  }

  /* Workspace on Mobile */
  .app {
    padding: 24px 12px 45px;
  }

  .app-header h2 {
    font-size: 1.45rem;
  }

  .app-header p {
    font-size: 0.82rem;
  }

  /* Mode Switcher Tabs on Mobile */
  .type-tabs {
    grid-template-columns: 1fr 1fr;
    width: 100%;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 20px;
  }

  .type-tab {
    height: 40px;
    padding: 6px 4px;
    font-size: 12px;
    border-radius: 8px;
    gap: 5px;
  }

  .type-tab i {
    font-size: 12px;
  }

  /* Controls & Dimension Grid on Mobile */
  .controls {
    padding: 16px 14px;
    border-radius: 14px;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .dim-inputs-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 10px 6px !important;
    margin-bottom: 14px !important;
    border-radius: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .dim-box {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .dim-label {
    font-size: 0.65rem !important;
    letter-spacing: 0.2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    margin-bottom: 4px !important;
  }

  .dim-label i {
    font-size: 0.65rem !important;
    flex-shrink: 0 !important;
  }

  .dim-input-group {
    height: 40px !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .dim-input-group input {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: 0 !important;
    font-size: 13.5px !important;
    padding: 0 4px !important;
    text-align: center !important;
  }

  .dim-input-group .dim-unit {
    font-size: 11px !important;
    padding: 0 6px !important;
    flex-shrink: 0 !important;
  }

  /* Mobile Form Controls: Symmetrical 2-Column Grid matching Section 1 & Section 3 */
  .controls-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .cg-span-2,
  .cg-full-divider,
  .cg-checkbox.cg-span-2 {
    grid-column: 1 / -1;
  }

  .cg label {
    font-size: 0.68rem;
    font-weight: 700;
    margin-bottom: 3px;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .cg select {
    min-height: 42px;
    height: 42px;
    font-size: 12px;
    padding: 6px 26px 6px 9px;
    background-position: right 8px center;
    background-size: 11px auto;
  }

  .cg input[type="text"],
  .cg input[type="number"],
  .cg input[type="file"] {
    min-height: 42px;
    font-size: 12.5px;
    padding: 8px 10px;
  }

  .cg-checkbox {
    padding: 9px 12px;
    min-height: 42px;
  }

  .cg-checkbox label {
    font-size: 12px !important;
    white-space: normal !important;
  }

  /* Cell Preview Card on Mobile */
  .cell-preview-card {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 10px;
    padding: 12px 14px;
  }

  .cell-preview-left {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }

  .cell-preview-icon {
    margin: 0 auto;
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .cell-preview-text h6 {
    font-size: 12.5px;
  }

  .cell-preview-text p {
    font-size: 11.5px;
  }

  .cell-preview-badge {
    width: 100%;
    text-align: center;
    font-size: 11px;
    padding: 6px 10px;
    white-space: normal;
  }

  /* Presets on Mobile */
  .preset-wrapper {
    padding: 10px 12px;
    margin-top: 14px;
    border-radius: 10px;
  }

  .preset-badge {
    font-size: 10.5px;
    padding: 3px 8px;
  }

  .preset-hint {
    font-size: 11px;
  }

  .preset-chips {
    gap: 6px;
  }

  .preset-btn {
    font-size: 11px;
    padding: 5px 11px;
  }

  /* Buttons on Mobile */
  .btn-row {
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
  }

  .btn-generate {
    width: 100%;
    min-height: 46px;
    font-size: 13.5px;
    padding: 12px 16px;
  }

  .btn-secondary-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .btn-secondary {
    min-height: 42px;
    font-size: 12px;
    padding: 8px 6px;
    justify-content: center;
  }

  /* 3D Canvas Box on Mobile */
  #boxCanvas {
    height: clamp(340px, 85vw, 420px);
    border-radius: 12px;
  }

  /* Canvas Live Badge on Mobile */
  .canvas-live-badge {
    top: 10px;
    left: 10px;
    font-size: 10.5px;
    padding: 4px 10px;
    max-width: calc(100% - 20px);
  }

  /* Floating Bottom Dock View Controls on Mobile (Zero collision with badge!) */
  .view-controls {
    position: absolute;
    top: auto;
    bottom: 8px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100% - 14px);
    max-width: 480px;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    background: rgba(15, 23, 42, 0.84);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 4px 6px;
    border-radius: 50px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    gap: 5px;
    z-index: 25;
    touch-action: pan-x;
  }

  .view-controls::-webkit-scrollbar {
    display: none;
  }

  .view-btn {
    flex: 0 0 auto;
    height: 30px;
    padding: 0 9px;
    font-size: 10.5px;
    font-weight: 600;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95);
    color: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    gap: 3px;
  }

  .view-btn.active {
    background: linear-gradient(135deg, #002F6C, #0056b3);
    color: #ffffff;
    border-color: #002F6C;
  }

  .view-btn i {
    font-size: 11px;
  }

  #canvasWatermark > div:last-child {
    top: 40px !important;
    bottom: auto !important;
    left: 10px !important;
    padding: 3px 8px !important;
    transform: scale(0.82) !important;
    transform-origin: top left !important;
  }

  /* BOQ Panel on Mobile */
  .boq-panel {
    padding: 16px 12px;
    margin-top: 18px;
    border-radius: 12px;
  }

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

  .boq-status-badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  .boq-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .boq-item {
    padding: 10px;
    border-radius: 8px;
  }

  .boq-label {
    font-size: 0.63rem;
  }

  .boq-value {
    font-size: 0.88rem;
  }

  .boq-item-tag {
    font-size: 9px;
  }

  .boq-detail {
    font-size: 0.76rem;
    gap: 6px 10px;
    padding-top: 12px;
    margin-top: 14px;
  }

  .boq-actions {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 14px;
  }

  .boq-actions .btn-export {
    width: 100%;
    min-height: 42px;
    font-size: 12.5px;
  }

  /* Export Panel on Mobile */
  .export-panel {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
  }

  .export-panel .btn-export {
    font-size: 12px;
    padding: 10px 8px;
    min-height: 42px;
  }

  .export-panel .btn-export.primary,
  .export-panel .btn-export.btn-boq-wa,
  .export-panel .btn-export.btn-quote-cta {
    grid-column: 1 / -1;
    min-height: 46px;
    font-size: 13px;
  }

  /* Corporate Consultation CTA on Mobile */
  .design3d-cta-section {
    padding: 45px 0;
  }

  .design3d-cta-section h2 {
    font-size: 1.55rem;
  }

  .design3d-cta-section p.cta-lead {
    font-size: 0.9rem;
    margin-bottom: 24px;
  }

  .cta-btn-group {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .cta-btn-group .btn-cta-gold,
  .cta-btn-group .btn-cta-whatsapp,
  .cta-btn-group .btn-cta-phone {
    width: 100%;
    justify-content: center;
    font-size: 13.5px;
    padding: 11px 20px;
  }
}

/* --- Extra Small Screens (<= 480px) --- */
@media (max-width: 480px) {
  .dim-inputs-grid {
    gap: 4px !important;
    padding: 8px 4px !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .dim-box {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .dim-label {
    font-size: 0.6rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    gap: 2px !important;
  }

  .dim-input-group {
    height: 38px !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .dim-input-group input {
    font-size: 12px !important;
    padding: 0 2px !important;
    min-width: 0 !important;
    width: 0 !important;
    text-align: center !important;
  }

  .dim-input-group .dim-unit {
    font-size: 9.5px !important;
    padding: 0 4px !important;
    flex-shrink: 0 !important;
  }

  .type-tab {
    font-size: 11px;
    gap: 4px;
    height: 38px;
  }

  .view-btn span {
    font-size: 9.5px;
  }
}

/* ==============================================================
   EVA FOAM OPTION CARD & SUBFIELDS
   ============================================================== */
.foam-option-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  transition: all 0.25s ease;
}

.foam-option-box:hover {
  border-color: #cbd5e1;
}

.foam-option-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.foam-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
}

.foam-title {
  font-weight: 600;
  font-size: 13.5px;
  color: #1e293b;
}

.foam-option-box.active {
  background: #f0f9ff;
  border-color: #0284c7;
  box-shadow: 0 3px 12px rgba(2, 132, 199, 0.12);
}

.foam-option-box.active .foam-badge {
  background: #0284c7;
  color: #ffffff;
}

.foam-view-btn {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #bae6fd;
  background: #ffffff;
  color: #0284c7;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.foam-view-btn:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  transform: translateY(-1px);
}

.foam-subfields {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #cbd5e1;
}

.foam-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 576px) {
  .foam-controls-grid {
    grid-template-columns: 1fr;
  }
}

/* Fabric Edge Binding Sub-options Styling */
.part-fabric-options,
.box-fabric-options {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 10px 14px;
  margin-top: 4px;
  transition: all 0.2s ease;
}

.part-fabric-options:hover,
.box-fabric-options:hover {
  border-color: #cbd5e1;
}

