@charset "UTF-8";
/* enVision Pergola Configurator — Premium Design System v2 */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

/* ═══ TOKENS ══════════════════════════════════════════════════════ */
.apc {
  --navy:      #0b1624;
  --navy-mid:  #152033;
  --gold:      #29a9e0;       /* enVision brand blue (replaces gold) */
  --gold-lt:   #4bc3f5;       /* Lighter blue for gradients & hover */
  --gold-pale: rgba(41,169,224,.08);
  --cream:     #f7f5f0;
  --white:     #ffffff;
  --text:      #111827;
  --muted:     #6b7280;
  --border:    #e5e7eb;
  --border-dk: #d1d5db;
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 16px rgba(0,0,0,.08);
  --ease:      cubic-bezier(.4,0,.2,1);
  --sidebar:   360px;
}

.apc*, .apc *::before, .apc *::after { box-sizing: border-box; margin: 0; padding: 0; }
.apc { font-family: 'Montserrat', system-ui, -apple-system, sans-serif; color: var(--text); background: var(--cream); max-width: 1440px; margin: 0 auto; -webkit-font-smoothing: antialiased; }

/* ═══ HEADER ══════════════════════════════════════════════════════ */
.apc-header {
  background: linear-gradient(135deg, var(--navy) 0%, #162236 100%);
  padding: 28px 32px 24px;
  position: relative; overflow: hidden;
}
.apc-header::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(41,169,224,.06) 0%, transparent 70%);
  pointer-events: none;
}
.apc-header::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold) 15%, var(--gold) 85%, transparent);
}
.apc-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .25em; color: var(--gold); margin-bottom: 8px;
  opacity: .9; display: block;
}
.apc-title {
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  font-size: clamp(22px, 3vw, 36px); font-weight: 800;
  color: var(--white); line-height: 1.1; letter-spacing: -.02em;
  text-transform: uppercase;
}
.apc-logo {
  max-width: 260px; max-height: 80px; width: auto; height: auto;
  display: block; margin: 8px 0 4px;
}
@media (max-width: 700px) { .apc-logo { max-width: 200px; max-height: 60px; } }

/* ═══ LAYOUT ══════════════════════════════════════════════════════ */
.apc-body { display: flex; align-items: stretch; background: var(--white); }
.apc-left  { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; background: #f0ede6; }

/* ═══ TOOLBAR ═════════════════════════════════════════════════════ */
.apc-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 16px;
  background: var(--navy); flex-wrap: wrap;
}

/* ═══ VIEW MODE PILLS ═════════════════════════════════════════════ */
.apc-view-modes { display: flex; gap: 3px; flex-wrap: wrap; }
.apc-view-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 13px; border: none; border-radius: 20px;
  background: rgba(255,255,255,.07);
  font-family: 'Montserrat', sans-serif; font-size: 11px; font-weight: 500;
  color: rgba(255,255,255,.5); cursor: pointer;
  transition: all .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.apc-view-btn svg { opacity: .6; transition: opacity .2s; flex-shrink: 0; }
.apc-view-btn:hover { color: rgba(255,255,255,.85); background: rgba(255,255,255,.12); }
.apc-view-btn:hover svg { opacity: 1; }
.apc-view-btn.apc-view-on {
  background: rgba(41,169,224,.18); color: var(--gold);
  box-shadow: 0 0 0 1px rgba(41,169,224,.3);
}
.apc-view-btn.apc-view-on svg { opacity: 1; }

/* ═══ LOUVER CONTROL ══════════════════════════════════════════════ */
.apc-louver-ctrl {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.apc-louver-lbl {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: rgba(255,255,255,.4);
}
.apc-louver-tag { font-size: 10px; color: rgba(255,255,255,.45); white-space: nowrap; }
.apc-louver-range {
  width: 110px; -webkit-appearance: none; appearance: none;
  height: 2px; background: rgba(41,169,224,.4);
  outline: none; cursor: pointer; border-radius: 0;
  touch-action: pan-y;
}
.apc-louver-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--navy);
  box-shadow: 0 0 0 3px rgba(41,169,224,.25); cursor: pointer;
  transition: transform .15s;
}
.apc-louver-range::-webkit-slider-thumb:hover { transform: scale(1.2); }
.apc-louver-range::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--navy);
}
.apc-auto-toggle {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; color: rgba(255,255,255,.4); cursor: pointer;
  white-space: nowrap;
}
.apc-auto-toggle input { accent-color: var(--gold); }

/* ═══ DIMENSION PILL ══════════════════════════════════════════════ */
.apc-dim-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; background: var(--white);
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.apc-dim-pill-item {
  display: flex; align-items: baseline; gap: 3px;
  font-size: 13px; font-weight: 500; color: var(--text);
}
.apc-dim-pill-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--gold);
}
.apc-dim-pill-sep { font-size: 11px; color: var(--border-dk); }

/* ═══ VIEWER WRAPPER ══════════════════════════════════════════════ */
.apc-viewer-wrap {
  position: relative;
  flex: 1; display: flex; flex-direction: column;
}

/* ═══ 3D VIEWER ═══════════════════════════════════════════════════ */
.apc-viewer {
  position: relative; width: 100%;
  min-height: 360px; height: clamp(360px, 52vw, 680px);
  background: #eeebe4; overflow: hidden; display: block;
}
.apc-viewer canvas { position: absolute; inset: 0; width: 100%!important; height: 100%!important; display: block; }

/* ═══ LOADING ═════════════════════════════════════════════════════ */
.apc-loading {
  position: absolute; inset: 0; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(247,245,240,.95);
  font-size: 11px; font-weight: 500; letter-spacing: .15em;
  text-transform: uppercase; color: var(--navy); z-index: 10;
}
.apc-loading.on { display: flex; }
.apc-spin {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid rgba(11,22,36,.08); border-top-color: var(--gold);
  animation: apc-spin .8s linear infinite;
}
@keyframes apc-spin { to { transform: rotate(360deg); } }

/* ═══ NAV TOOLTIP ════════════════════════════════════════════════ */
.apc-nav-tip {
  position: absolute;
  top: 12px; right: 48px;
  background: rgba(30,40,56,.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px; line-height: 1.8;
  z-index: 20;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  animation: apc-fade-in .15s ease;
}
.apc-nav-tip strong { color: #fff; font-weight: 600; margin-right: 4px; }
@keyframes apc-fade-in { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }

/* ═══ HELP BUTTON ═════════════════════════════════════════════════ */
.apc-help {
  position: absolute; top: 12px; right: 12px;
  background: rgba(11,22,36,.7); backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(41,169,224,.45); border-radius: 50%;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  font-family: 'Montserrat', sans-serif; font-size: 15px; font-weight: 600;
  color: var(--gold); cursor: pointer;
  z-index: 20;
  transition: all .18s;
}
.apc-help:hover { background: var(--navy); border-color: var(--gold); }

/* ═══ CAMERA BUTTONS ══════════════════════════════════════════════ */
.apc-cams {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; background: var(--white);
  border-top: 1px solid var(--border); flex-shrink: 0;
}
.apc-cam {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--white);
  color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s var(--ease); flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.apc-cam:hover:not(:disabled) {
  border-color: var(--gold); color: var(--gold); background: var(--gold-pale);
  box-shadow: 0 0 0 3px rgba(41,169,224,.1);
}
.apc-cam:disabled { opacity: .3; cursor: default; }
.apc-cam:active:not(:disabled) { transform: scale(.93); }

/* ═══ SIDEBAR ═════════════════════════════════════════════════════ */
.apc-sidebar {
  width: var(--sidebar); flex-shrink: 0;
  border-left: 1px solid var(--border);
  position: sticky; top: 0; max-height: 100vh;
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
  background: var(--white); display: flex; flex-direction: column;
}
.apc-sidebar::-webkit-scrollbar { width: 3px; }
.apc-sidebar::-webkit-scrollbar-thumb { background: var(--border); }

/* ═══ ACCORDION ═══════════════════════════════════════════════════ */
.apc-acc { border-bottom: 1px solid var(--border); }
.apc-acc-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: var(--white); border: none; cursor: pointer;
  font-family: 'Montserrat', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--navy);
  text-align: left; transition: background .12s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.apc-acc-btn:hover { background: #faf9f6; }
.apc-acc-sign { font-size: 18px; font-weight: 300; color: var(--gold); line-height: 1; }
.apc-acc.open .apc-acc-sign::before { content: '\2212'; }
.apc-acc:not(.open) .apc-acc-sign::before { content: '+'; }
.apc-acc-body { display: none; padding: 18px 20px 18px; }
.apc-acc.open .apc-acc-body { display: block; }

/* ═══ DIMENSIONS ══════════════════════════════════════════════════ */
.apc-dim + .apc-dim { margin-top: 16px; }
.apc-dim-lbl {
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 6px; display: flex; align-items: baseline; gap: 8px;
}
.apc-dim-lbl span {
  font-family: 'Montserrat', sans-serif;
  color: var(--navy); font-weight: 400; font-size: 16px;
  text-transform: none; letter-spacing: 0;
}
.apc-dim-lbl small { color: var(--muted); font-size: 10px; font-weight: 400; text-transform: none; }
.apc-dim-row { display: flex; align-items: center; gap: 8px; }
.apc-dim-row input[type=range] {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 6px; background: var(--border-dk); outline: none;
  cursor: pointer; border-radius: 3px; touch-action: pan-y;
  background: linear-gradient(to right, var(--gold) 0%, var(--gold) 50%, var(--border-dk) 50%);
}
.apc-dim-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--gold);
  box-shadow: 0 1px 4px rgba(0,0,0,.18); cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.apc-dim-row input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.15); box-shadow: 0 0 0 4px rgba(41,169,224,.15);
}
.apc-dim-row input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--gold);
}
.apc-step {
  width: 26px; height: 26px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--white);
  color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: all .15s; -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.apc-step:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-pale); }

/* ═══ COLORS ══════════════════════════════════════════════════════ */
.apc-color-grp { margin-bottom: 14px; }
.apc-color-grp:last-child { margin-bottom: 0; }
.apc-color-lbl { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.apc-color-row { display: flex; align-items: center; gap: 8px; }
.apc-color-row select {
  flex: 1; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 28px 8px 10px; font-family: 'Montserrat', sans-serif;
  font-size: 13px; color: var(--text); outline: none; cursor: pointer;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2329a9e0'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none; appearance: none; transition: border-color .15s;
}
.apc-color-row select:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(41,169,224,.1); }
.apc-swatch-box { width: 26px; height: 26px; border: 1px solid var(--border); flex-shrink: 0; border-radius: var(--radius-sm); }

/* ═══ RADIO / CHECK ═══════════════════════════════════════════════ */
.apc-radio-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.apc-radio-opt { display: flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.apc-radio-opt input { accent-color: var(--gold); width: 15px; height: 15px; }
.apc-chk-list { display: grid; gap: 9px; }
.apc-chk-opt { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; cursor: pointer; line-height: 1.5; -webkit-tap-highlight-color: transparent; }
.apc-chk-opt input { accent-color: var(--gold); width: 15px; height: 15px; margin-top: 2px; flex-shrink: 0; }
.apc-sub-lbl { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); margin: 14px 0 7px; }
.apc-sub { display: none; margin-top: 6px; }
.apc-sub.on { display: block; }

/* ═══ FIELDS ══════════════════════════════════════════════════════ */
.apc-field { margin-bottom: 12px; }
.apc-field:last-child { margin-bottom: 0; }
.apc-field > label { display: block; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.apc-field select {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 10px; font-family: 'Montserrat', sans-serif;
  font-size: 13px; color: var(--text); background: var(--white); outline: none;
  transition: border-color .15s;
}
.apc-field select:focus { border-color: var(--gold); }
.apc-slider-lbl { font-size: 11px; font-weight: 500; color: var(--muted); margin-bottom: 5px; display: flex; justify-content: space-between; }
.apc-slider-row { display: flex; align-items: center; gap: 8px; }
.apc-slider-row input[type=range] {
  flex: 1; -webkit-appearance: none; height: 2px;
  background: var(--gold); outline: none; cursor: pointer; touch-action: pan-y;
}
.apc-slider-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--gold);
  box-shadow: 0 1px 4px rgba(0,0,0,.12); transition: transform .15s;
}
.apc-slider-row input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.apc-slider-row input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--white); border: 2px solid var(--gold); }

/* ═══ WALL COLOR ══════════════════════════════════════════════════ */
.apc-wall-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.apc-wall-swatch { width: 34px; height: 34px; border: 1px solid var(--border); cursor: pointer; flex-shrink: 0; border-radius: var(--radius-sm); transition: border-color .15s; }
.apc-wall-swatch:hover { border-color: var(--gold); }
.apc-wall-hex { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 10px; font-size: 12px; font-family: monospace; width: 100px; outline: none; color: var(--text); }
.apc-wall-hex:focus { border-color: var(--gold); }
.apc-wall-reset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 12px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; background: var(--white); cursor: pointer; color: var(--muted); transition: all .15s; }
.apc-wall-reset:hover { border-color: var(--gold); color: var(--gold); }

/* ═══ ENVIRONMENT ═════════════════════════════════════════════════ */
.apc-env-mode { display: flex; gap: 20px; margin-bottom: 12px; }
.apc-sun-lbl { font-size: 10px; font-weight: 600; letter-spacing: .08em; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 5px; }
.apc-sun-range { width: 100%; -webkit-appearance: none; height: 2px; background: var(--gold); outline: none; cursor: pointer; touch-action: pan-y; }
.apc-sun-range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--white); border: 2px solid var(--gold); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.apc-moon-lbl { font-size: 10px; font-weight: 600; color: var(--muted); display: flex; justify-content: space-between; margin: 12px 0 5px; }

/* ═══ PLAN VIEW ═══════════════════════════════════════════════════ */
.apc-plan-wrap { background: var(--white); border: 1px solid var(--border); margin-bottom: 10px; padding: 10px; min-height: 150px; display: flex; align-items: center; justify-content: center; overflow: auto; border-radius: var(--radius-sm); }
.apc-plan-wrap canvas { max-width: 100%; height: auto; display: block; }
.apc-dl-btn { width: 100%; background: var(--navy); color: #ffffff; border: 1px solid rgba(41,169,224,.25); padding: 11px; font-family: 'Montserrat', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; border-radius: var(--radius-sm); cursor: pointer; transition: all .15s; }
.apc-dl-btn:hover { background: var(--gold); color: var(--navy); }

/* ═══ FOOTER ══════════════════════════════════════════════════════ */
.apc-footer { padding: 16px 20px; border-top: 1px solid var(--border); background: var(--white); position: sticky; bottom: 0; z-index: 5; margin-top: auto; }
.apc-quote-btn {
  width: 100%; background: var(--gold); color: #ffffff; border: none;
  padding: 15px; font-family: 'Montserrat', sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all .18s var(--ease);
  box-shadow: 0 2px 0 rgba(0,0,0,.12), 0 4px 14px rgba(41,169,224,.2);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.apc-quote-btn:hover { background: var(--gold-lt); transform: translateY(-1px); box-shadow: 0 4px 0 rgba(0,0,0,.1), 0 6px 20px rgba(41,169,224,.25); }
.apc-quote-btn:active { transform: translateY(0); box-shadow: 0 1px 0 rgba(0,0,0,.15); }
.apc-disc { font-size: 10px; color: var(--muted); line-height: 1.6; margin-top: 10px; }

/* ═══ QUOTE FORM (legacy) ═══════════════════════════════════════════════ */
.apc-quote-sec { padding: 48px 32px 56px; background: var(--white); border-top: 1px solid var(--border); }
.apc-q-eyebrow { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .2em; color: var(--gold); margin-bottom: 10px; }
.apc-q-title { font-family: 'Montserrat', system-ui, -apple-system, sans-serif; font-size: 36px; font-weight: 600; color: var(--navy); margin-bottom: 8px; line-height: 1.15; }
.apc-q-sub { font-size: 14px; color: var(--muted); margin-bottom: 32px; line-height: 1.6; }
.apc-form-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 16px; }
.apc-form-field label { display: block; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.apc-form-field input, .apc-form-field textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; font-family: 'Montserrat', sans-serif;
  font-size: 14px; color: var(--text); outline: none; background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.apc-form-field input:focus, .apc-form-field textarea:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(41,169,224,.1);
}
.apc-form-field textarea { min-height: 110px; resize: vertical; }
.apc-form-full { grid-column: 1/-1; }
.apc-submit {
  background: var(--navy); color: var(--white); border: none;
  padding: 14px 40px; font-family: 'Montserrat', sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  border-radius: var(--radius-sm); cursor: pointer; margin-top: 8px;
  transition: all .18s var(--ease); touch-action: manipulation;
  box-shadow: 0 2px 0 rgba(0,0,0,.2);
}
.apc-submit:hover { background: var(--gold); color: var(--navy); transform: translateY(-1px); }
.apc-submit:disabled { opacity: .6; cursor: wait; transform: none; }
.apc-msg { font-size: 13px; font-weight: 500; margin-top: 12px; }
.apc-msg.ok { color: #166534; } .apc-msg.err { color: #b91c1c; }

/* ═══ FRAMING ═════════════════════════════════════════════════════ */
.apc-fr-title { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); margin: 16px 0 8px; }
.apc-fr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ═══ HELP TOOLTIP ════════════════════════════════════════════════ */
#apc-help-tip {
  position: absolute; bottom: 60px; left: 14px;
  background: rgba(11,22,36,.92); backdrop-filter: blur(8px);
  color: #fff; border: 1px solid rgba(41,169,224,.3); border-radius: var(--radius);
  padding: 14px 18px; font-size: 12px; line-height: 1.9;
  z-index: 20; max-width: 210px; pointer-events: none;
  box-shadow: var(--shadow);
}

/* ═══ CAM GROUPS ═════════════════════════════════════════════════ */
.apc-cam-group { display: flex; gap: 2px; }
.apc-cam-divider { width: 1px; background: var(--border); margin: 4px 6px; align-self: stretch; }
#apc-undo:disabled { opacity: .3; }

/* ═══ TABLET ══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .apc-body { flex-direction: column; }
  .apc-sidebar { width: 100%; position: static; max-height: none; border-left: none; border-top: 1px solid var(--border); }
  .apc-viewer { min-height: 380px; height: 52vw; max-height: 520px; }
  .apc-toolbar { padding: 8px 12px; }
}

/* ═══ MOBILE ══════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .apc { padding-bottom: 0; }
  .apc-header { padding: 20px 18px 16px; }
  .apc-title { font-size: 22px; }

  .apc-toolbar { flex-direction: column; align-items: flex-start; gap: 8px; padding: 8px 12px; }
  .apc-view-modes { gap: 3px; }
  .apc-view-btn { padding: 5px 10px; font-size: 10px; gap: 4px; }
  .apc-view-btn svg { display: none; }

  .apc-louver-ctrl { gap: 6px; }
  .apc-louver-range { width: 90px; }
  .apc-louver-lbl { display: none; }

  .apc-viewer { min-height: 240px; height: 58vw; max-height: 340px; }

  .apc-dim-pill { padding: 6px 12px; gap: 5px; }
  .apc-dim-pill-item { font-size: 12px; }

  .apc-cams { padding: 8px 12px; gap: 5px; }
  .apc-cam { width: 32px; height: 32px; }

  .apc-acc-btn { padding: 14px 16px; }
  .apc-acc-body { padding: 4px 16px 16px; }
  .apc-dim-row input[type=range]::-webkit-slider-thumb { width: 22px; height: 22px; }
  .apc-step { width: 30px; height: 30px; }

  .apc-quote-sec { padding: 32px 18px 40px; }
  .apc-q-title { font-size: 26px; }
  .apc-form-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .apc-submit { width: 100%; }
  .apc-fr-grid { grid-template-columns: 1fr; }
  .apc-footer { padding: 12px 14px; }
}

@media (max-width: 400px) {
  .apc-form-grid { grid-template-columns: 1fr; }
  .apc-view-btn { padding: 5px 8px; font-size: 9px; }
}

/* ════════════════════════════════════════════
   QUOTE MODAL — polished professional style
   ════════════════════════════════════════════ */
.apc-qm-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(11,22,36,0.65);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: apcOverlayIn .2s ease;
}
@keyframes apcOverlayIn { from { opacity:0; } to { opacity:1; } }

.apc-qm-card,
#apc-quote-modal .apc-qm-card {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-radius: 16px;
  padding: 0;
  width: 100%; max-width: 520px;
  max-height: 92vh; overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,0,0,0.06);
  animation: apcCardIn .25s cubic-bezier(.22,.68,0,1.2);
  color: #111111 !important;
}
@keyframes apcCardIn { from { opacity:0; transform:scale(.94) translateY(16px); } to { opacity:1; transform:none; } }

.apc-qm-card::before {
  content: '';
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--gold,#29a9e0) 0%, var(--gold-lt,#4bc3f5) 100%);
  border-radius: 16px 16px 0 0;
  flex-shrink: 0;
}

.apc-qm-body {
  padding: 32px 36px 36px;
  overflow-y: auto;
  flex: 1;
}

.apc-qm-close {
  position: absolute; top: 16px; right: 16px;
  background: #f4f4f4; border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 18px; line-height: 1; color: #555;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
  z-index: 2;
}
.apc-qm-close:hover { background: #e8e8e8; color: #111; }

.apc-qm-eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--gold,#29a9e0);
  margin: 0 0 10px;
}
.apc-qm-title {
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  font-size: 28px; font-weight: 600; line-height: 1.2;
  color: #0b1624; margin: 0 0 28px;
}

.apc-qm-form { display: flex; flex-direction: column; gap: 11px; }

.apc-qm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

#apc-quote-modal .apc-qm-input,
#apc-quote-modal input.apc-qm-input,
#apc-quote-modal select.apc-qm-input,
#apc-quote-modal textarea.apc-qm-input {
  width: 100% !important;
  box-sizing: border-box !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 14px !important;
  color: #111111 !important;
  border: 1.5px solid #e2e4e8 !important;
  border-radius: 8px !important;
  padding: 12px 14px !important;
  background: #fafafa !important;
  background-color: #fafafa !important;
  transition: border-color .15s, background .15s, box-shadow .15s;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  line-height: 1.5 !important;
  min-height: unset !important;
  max-width: 100% !important;
}
#apc-quote-modal .apc-qm-input:hover,
#apc-quote-modal input.apc-qm-input:hover,
#apc-quote-modal select.apc-qm-input:hover,
#apc-quote-modal textarea.apc-qm-input:hover {
  border-color: #c4c6cc !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
}
#apc-quote-modal .apc-qm-input:focus,
#apc-quote-modal input.apc-qm-input:focus,
#apc-quote-modal select.apc-qm-input:focus,
#apc-quote-modal textarea.apc-qm-input:focus {
  border-color: #29a9e0 !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(41,169,224,.12) !important;
  outline: none !important;
}
#apc-quote-modal .apc-qm-input::placeholder { color: #b0b3ba !important; opacity: 1 !important; }
#apc-quote-modal .apc-qm-input:-ms-input-placeholder { color: #b0b3ba !important; }

#apc-quote-modal select.apc-qm-input,
#apc-quote-modal .apc-qm-select {
  color: #444444 !important;
  cursor: pointer !important;
  background-color: #fafafa !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='6'%3E%3Cpath d='M1 1l4.5 4L10 1' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  padding-right: 38px !important;
}
#apc-quote-modal select.apc-qm-input option { color: #111111 !important; }

#apc-quote-modal textarea.apc-qm-input,
#apc-quote-modal .apc-qm-textarea {
  min-height: 96px !important;
  resize: vertical !important;
  line-height: 1.5 !important;
}

.apc-qm-divider { height: 1px; background: #f0f0f0; margin: 4px 0; }

.apc-qm-submit {
  width: 100%; padding: 15px;
  background: var(--gold,#29a9e0);
  color: #ffffff;
  border: none; border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer; margin-top: 6px;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(41,169,224,.3);
}
.apc-qm-submit:hover { background: var(--gold-lt,#4bc3f5); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(41,169,224,.4); }
.apc-qm-submit:active { transform: translateY(0); box-shadow: none; }
.apc-qm-submit:disabled { opacity: .6; cursor: wait; transform: none; box-shadow: none; }

.apc-msg { font-size: 13px; font-weight: 500; margin-top: 8px; text-align: center; }
.apc-msg.ok  { color: #1a7a3a; }
.apc-msg.err { color: #c0392b; }

@media (max-width: 560px) {
  .apc-qm-body { padding: 24px 20px 28px; }
  .apc-qm-title { font-size: 23px; }
  .apc-qm-row { grid-template-columns: 1fr; }
}

/* ═══ ALWAYS INCLUDED FEATURES ═══ */
.apc-incl-intro {
  font-size: 12px; color: var(--muted); line-height: 1.5;
  margin: 0 0 14px; padding: 10px 12px;
  background: var(--gold-pale); border-left: 3px solid var(--gold);
  border-radius: 4px;
}
.apc-incl-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.apc-incl-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color .12s, background .12s, transform .12s;
  min-height: 56px;
}
.apc-incl-item:hover {
  border-color: var(--gold);
  background: var(--white);
  transform: translateY(-1px);
}
.apc-incl-icon {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  background: linear-gradient(135deg, var(--gold), var(--gold-lt)) !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 6px rgba(41,169,224,.35);
  padding: 0 !important;
  margin: 0 !important;
  position: relative;
  overflow: hidden;
}
.apc-incl-icon svg {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  color: #fff !important;
  stroke: #fff !important;
  fill: none !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.apc-incl-icon svg * { stroke: #fff !important; }
.apc-incl-text { flex: 1; min-width: 0; }
.apc-incl-item strong {
  display: block;
  font-size: 12px; font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: 2px;
}
.apc-incl-item span {
  display: block;
  font-size: 10.5px; color: var(--muted);
  line-height: 1.3;
}
@media (max-width: 500px) { .apc-incl-grid { grid-template-columns: 1fr; } }

/* ═══ RAL CUSTOM COLOR PICKER ═══ */
.apc-ral-link {
  display: block; width: 100%; margin-top: 8px;
  background: transparent; border: 1px dashed var(--gold);
  color: var(--gold); font-family: 'Montserrat', sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  padding: 8px 10px; border-radius: 6px; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
  text-align: center;
}
.apc-ral-link:hover { background: var(--gold-pale); border-style: solid; }

.apc-ral-card { max-width: 780px !important; }
.apc-ral-intro {
  font-size: 13px; color: var(--muted); margin: 0 0 16px; line-height: 1.5;
}
.apc-ral-search-wrap {
  position: relative;
  margin-bottom: 14px;
}
.apc-ral-search-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--muted);
  pointer-events: none;
}
.apc-ral-search {
  width: 100%; box-sizing: border-box;
  padding: 12px 16px 12px 42px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px; color: var(--text);
  background: #fafafa;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  transition: border-color .15s, background .15s, box-shadow .15s;
  outline: none;
  -webkit-appearance: none; appearance: none;
}
.apc-ral-search::placeholder { color: #9ca3af; }
.apc-ral-search:hover {
  border-color: var(--border-dk);
  background: var(--white);
}
.apc-ral-search:focus {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(41,169,224,.15);
}
.apc-ral-search::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  height: 16px; width: 16px;
  background: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='15' y1='9' x2='9' y2='15'/%3E%3Cline x1='9' y1='9' x2='15' y2='15'/%3E%3C/svg%3E") no-repeat center;
  cursor: pointer;
}

.apc-ral-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px; max-height: 52vh; overflow-y: auto;
  margin-top: 12px;
  background: #f7f5f0; border-radius: 8px; padding: 12px;
}
.apc-ral-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px; border: 2px solid transparent;
  background: #fff; border-radius: 6px; cursor: pointer;
  font-family: 'Montserrat', sans-serif; transition: all .12s;
}
.apc-ral-item:hover { border-color: var(--gold); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.apc-ral-swatch {
  width: 100%; height: 40px; border-radius: 4px;
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.3);
}
.apc-ral-code { font-size: 10px; font-weight: 700; color: var(--navy); letter-spacing: .04em; margin-top: 3px; }
.apc-ral-name { font-size: 9px; color: var(--muted); text-align: center; line-height: 1.2; }

/* ═══ HINT TEXT (small) ═══ */
.apc-hint-sm {
  font-size: 10px; color: var(--muted); margin: 4px 0 0; line-height: 1.4;
}

/* ═══ QUOTE FORM CONSENT CHECKBOX ═══ */
.apc-qm-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #f8f8f5;
  border: 1.5px solid #e2e4e8;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  margin: 4px 0;
}
.apc-qm-consent:hover { border-color: #c4c6cc; background: #fff; }
.apc-qm-consent input[type=checkbox] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  cursor: pointer;
  accent-color: var(--gold, #29a9e0);
}
.apc-qm-consent-text {
  flex: 1;
  font-size: 12px;
  line-height: 1.55;
  color: #444;
  font-family: 'Montserrat', sans-serif;
}
.apc-qm-consent-text a {
  color: var(--gold, #29a9e0);
  text-decoration: underline;
  font-weight: 600;
}
.apc-qm-consent-text a:hover { color: var(--gold-lt, #4bc3f5); }

/* Invalid state when required and unchecked at submit */
.apc-qm-consent.apc-invalid {
  border-color: #ef4444;
  background: #fef2f2;
}
.apc-qm-consent.apc-invalid .apc-qm-consent-text {
  color: #b91c1c;
}
