/* ============================================================
   Eurosheds Configurator — Master Stylesheet
   ============================================================ */

/* -- Font Faces -------------------------------------------- */
@font-face {
  font-family: 'Saans';
  src: url('../fonts/saans-font-family/Saans-TRIAL-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Saans';
  src: url('../fonts/saans-font-family/Saans-TRIAL-RegularItalic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Saans';
  src: url('../fonts/saans-font-family/Saans-TRIAL-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Saans';
  src: url('../fonts/saans-font-family/Saans-TRIAL-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Saans';
  src: url('../fonts/saans-font-family/Saans-TRIAL-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* -- Custom Properties ------------------------------------- */
:root {
  --color-dust:       #F9F7F2;
  --color-pine-light: #F0E8DD;
  --color-resin:      #E1673C;
  --color-pine-dark:  #303B19;
  --color-pine-hover: #3a4620;
  --color-rust:       #311E1E;
  --color-slate:      #151515;
  --color-white:      #FFFFFF;
  --color-border:     #E2E2E2;
  --color-muted:      #8A8A8A;
  --color-muted-light:#B0B0B0;
  --color-discount:   #2e7d32;
  --color-error:      #a23d3d;
  --color-checkout-hover: #edebe4;
  --color-callout-bg:  #FFF8E7;
  --color-callout-border: #E8D5A3;
  --color-callout-text:   #8B6914;

  --font-family: 'Saans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sidebar-width: 380px;
  --info-bar-h: 34px;
  --logo-bar-h: 52px;
  --tabs-bar-h: 42px;
  --footer-bar-h: 52px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --transition: 0.15s ease;

  --shadow-xs:    0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:    0 2px 6px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg:    0 4px 12px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-modal: 0 12px 40px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
  --shadow-up:    0 -2px 6px rgba(0,0,0,0.05);
}

/* -- Reset & Base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-slate);
  background: var(--color-dust);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* -- Info Bar (topmost) ------------------------------------ */
.info-bar {
  height: var(--info-bar-h);
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-slate);
  flex-shrink: 0;
  letter-spacing: 0.01em;
}
.info-bar svg { flex-shrink: 0; opacity: 0.7; }
.info-bar a {
  color: var(--color-slate);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.info-bar a:hover { color: var(--color-resin); }

/* -- Logo Bar (row 1) -------------------------------------- */
.logo-bar {
  height: var(--logo-bar-h);
  background: var(--color-rust);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 max(24px, calc(40% - 420px));
  flex-shrink: 0;
}
.logo-bar__logo {
  height: 28px;
  width: auto;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}
.logo-bar__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 400;
  color: var(--color-dust);
  cursor: pointer;
  opacity: 0.85;
  transition: opacity var(--transition);
}
.logo-bar__btn:hover { opacity: 1; }
.logo-bar__btn svg { opacity: 0.7; }

/* -- Step Tabs Bar (row 2) --------------------------------- */
.step-tabs-bar {
  height: var(--tabs-bar-h);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}
.step-tabs {
  display: flex;
  align-items: stretch;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 0;
}
.step-tabs::-webkit-scrollbar { display: none; }

.step-tab-sep {
  display: flex;
  align-items: center;
  color: var(--color-muted-light);
  font-size: 10px;
  padding: 0 2px;
  user-select: none;
  flex-shrink: 0;
}

.step-tab {
  display: flex;
  align-items: center;
  padding: 0 10px;
  height: 100%;
  border: none;
  background: none;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color var(--transition);
  flex-shrink: 0;
}
.step-tab:hover { color: var(--color-slate); }
.step-tab.active { color: var(--color-slate); font-weight: 600; }
.step-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 3px;
  background: var(--color-rust);
  border-radius: 3px 3px 0 0;
}

/* -- Price Overlay (inside viewer) ------------------------- */
.viewer-price {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--color-dust);
  padding: 5px 14px;
  border-radius: 2px;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}
.viewer-price__amount {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-resin);
}
.viewer-price__sep {
  margin: 0 6px;
  font-size: 13px;
  color: var(--color-muted-light);
}
.viewer-price__sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-slate);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* -- Page Shell -------------------------------------------- */
.app {
  display: flex;
  height: calc(100vh - var(--info-bar-h) - var(--logo-bar-h) - var(--tabs-bar-h));
  height: calc(100dvh - var(--info-bar-h) - var(--logo-bar-h) - var(--tabs-bar-h));
  overflow: hidden;
}

/* -- Viewer Area ------------------------------------------- */
.viewer-area {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--color-white);
}
charpstar-container {
  display: block;
  width: 100%;
  flex: 1;
  min-height: 0;
}

/* -- Sidebar ----------------------------------------------- */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  background: var(--color-dust);
  border-left: 1px solid var(--color-border);
  box-shadow: -3px 0 10px rgba(0,0,0,0.04);
  flex-shrink: 0;
  height: 100%;
  overflow: hidden;
}

.sidebar-header {
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-dust);
  flex-shrink: 0;
}
.sidebar-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-slate);
  text-transform: uppercase;
}
.sidebar-header p {
  margin: 1px 0 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* -- Step Panels ------------------------------------------- */
.step-panel {
  display: none;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding-top: 6px;
  padding-bottom: 6px;
}
.step-panel.active { display: block; }
#step2.active { display: flex; flex-direction: column; padding-bottom: 0; }

/* -- Sidebar Bottom Nav ------------------------------------ */
.step-nav {
  display: flex;
  gap: 8px;
  padding: 10px 20px;
  border-top: 1px solid var(--color-border);
  background: var(--color-dust);
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 20;
}
.step-nav button {
  flex: 1;
  padding: 8px 0;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-back {
  background: var(--color-white);
  color: var(--color-muted);
  border: 1px solid var(--color-border) !important;
  box-shadow: var(--shadow-xs);
}
.btn-back:hover { background: var(--color-pine-light); color: var(--color-slate); box-shadow: var(--shadow-sm); }
.btn-back:disabled { opacity: 0.35; cursor: default; }
.btn-back:disabled:hover { background: var(--color-white); color: var(--color-muted); }
.btn-next {
  background: var(--color-pine-dark);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}
.btn-next:hover { background: var(--color-pine-hover); box-shadow: var(--shadow-md); }
.btn-next:disabled { opacity: 0.35; cursor: default; }
.btn-next:disabled:hover { background: var(--color-pine-dark); box-shadow: var(--shadow-sm); }

/* -- Step 1: Style Grid (sidebar) -------------------------- */
.style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.style-grid-card {
  display: grid;
  grid-template-rows: auto 32px auto auto auto;
  align-items: start;
  row-gap: 1px;
  padding: 11px 8px 10px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  position: relative;
}
.style-grid-card:hover {
  border-color: var(--color-muted-light);
  box-shadow: var(--shadow-sm);
}
.style-grid-card.active {
  border-color: var(--color-pine-dark);
  box-shadow: 0 0 0 1.5px var(--color-pine-dark);
}
.style-grid-card__check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-pine-dark);
  display: none;
  align-items: center;
  justify-content: center;
}
.style-grid-card.active .style-grid-card__check { display: flex; }
.style-grid-card__check svg { width: 10px; height: 10px; }

.style-grid-card__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 3px;
  background: var(--color-dust);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 8px;
}
.style-grid-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.style-grid-card__img-ph {
  font-size: 10px;
  font-weight: 500;
  color: var(--color-muted-light);
}

.style-grid-card__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-slate);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0;
  line-height: 1.3;
  align-self: start;
  min-height: 30px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.style-grid-card__desc {
  font-size: 10px;
  font-weight: 400;
  color: var(--color-muted);
  line-height: 1.3;
  margin-bottom: 0;
  min-height: 12px;
}
.style-grid-card__price {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-pine-dark);
  margin-top: 0;
}

.style-grid-card--disabled,
.style-card--disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
.style-grid-card--disabled:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--color-border);
}
.style-grid-card__badge {
  margin-top: 4px;
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* -- Step 1: Form Elements --------------------------------- */
.s1-body { padding: 14px 20px; }

.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 400;
  font-family: var(--font-family);
  background: var(--color-white);
  box-shadow: var(--shadow-xs);
  color: var(--color-slate);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238A8A8A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.field select:focus { border-color: var(--color-rust); box-shadow: var(--shadow-sm); }

/* Shared custom radio base */
.radio-group-s1 input[type="radio"],
.radio-item input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: border-color var(--transition);
}
.radio-group-s1 input[type="radio"]:checked,
.radio-item input[type="radio"]:checked { border-color: var(--color-resin); }
.radio-group-s1 input[type="radio"]:checked::after,
.radio-item input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 50%;
  background: var(--color-resin);
}

/* Variant radio group (Step 1) */
.radio-group-s1 { display: flex; flex-wrap: wrap; gap: 6px; }
.radio-group-s1 label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-slate);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.radio-group-s1 label:hover { border-color: var(--color-muted-light); }
.radio-group-s1 input[type="radio"] {
  width: 13px;
  height: 13px;
}
.radio-group-s1 input[type="radio"]:checked::after {
  width: 5px;
  height: 5px;
}
.radio-group-s1 label:has(input:checked) {
  border-color: var(--color-rust);
  background: rgba(49,30,30,0.05);
  box-shadow: var(--shadow-xs);
}

/* -- Accordion --------------------------------------------- */
.acc-section {
  border-bottom: none;
  padding: 0 12px;
  margin-bottom: 14px;
}
.acc-section:first-child { margin-top: 2px; }
.acc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--color-pine-dark);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}
.acc-header:hover { background: var(--color-pine-hover); }
.acc-header span:first-child {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-white);
}
.acc-chevron,
.wall-card__chevron {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  transition: transform 0.2s ease;
}
.acc-section.collapsed .acc-chevron,
.wall-card--collapsed .wall-card__chevron { transform: rotate(0deg); }
.acc-section:not(.collapsed) .acc-chevron,
.wall-card:not(.wall-card--collapsed) .wall-card__chevron { transform: rotate(90deg); }
.acc-section.collapsed .acc-body { display: none; }
.acc-body,
.wall-card__body,
.accessory-list__body {
  margin-top: 4px;
  padding: 10px 12px 12px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
}

.acc-status,
.wall-card__meta {
  font-size: 11px;
  font-weight: 400;
  color: var(--color-dust);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.15);
  margin-left: auto;
  margin-right: 10px;
}
.acc-status:empty { display: none; }

/* -- Selected Color Indicator ----------------------------- */
.swatch-selected {
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-muted);
}
.swatch-selected strong {
  font-weight: 500;
  color: var(--color-slate);
  margin-left: 4px;
}

/* -- Labels & Descriptions --------------------------------- */
.step-label {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-muted);
  letter-spacing: 0.02em;
}
.step-label i { font-style: normal; color: var(--color-muted-light); }

.section-title {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-pine-dark);
  margin: 0 0 2px;
}
.section-desc {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

/* -- Radio Items (inside accordion) ------------------------ */
.radio-group { margin-bottom: 4px; }
.radio-group:last-child { margin-bottom: 0; }
.radio-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 6px;
  margin-bottom: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-slate);
  transition: background var(--transition);
}
.radio-item:hover { background: var(--color-dust); }
.radio-item input[type="radio"] {
  width: 16px;
  height: 16px;
}
.radio-item input[type="radio"]:checked::after {
  width: 8px;
  height: 8px;
}
.radio-item .included {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-muted-light);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.radio-item .price {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-pine-dark);
}
.radio-item .price--discount {
  color: var(--color-discount);
}

/* -- Disabled Radio Items ---------------------------------- */
.radio-item--disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

/* -- Tooltips ---------------------------------------------- */
.tooltip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  color: var(--color-muted);
  cursor: help;
  vertical-align: middle;
  flex-shrink: 0;
  text-transform: none;
}
.tooltip-floating {
  position: fixed;
  z-index: 99999;
  background: var(--color-pine-dark);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: normal;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: normal;
  width: max-content;
  max-width: 220px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  box-shadow: var(--shadow-md);
}
.tooltip-floating.visible { opacity: 1; }

/* -- Placement Buttons ------------------------------------- */
.placement-group { margin-bottom: 6px; }
.placement-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 3px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  box-shadow: var(--shadow-xs);
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition);
}
.placement-btn:hover {
  border-color: var(--color-muted-light);
  color: var(--color-slate);
  box-shadow: var(--shadow-sm);
}
.placement-btn.active {
  border-color: var(--color-pine-dark);
  background: var(--color-pine-dark);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}
.placement-btn .price {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.7;
}

/* -- Colour Swatch Grid ------------------------------------ */
.swatch-grid { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.swatch-btn {
  width: 28px;
  height: 28px;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  position: relative;
}
.swatch-btn:hover {
  transform: scale(1.02);
}
.swatch-btn.active {
  transform: scale(1.02);
  box-shadow: 0 0 0 1.5px var(--color-pine-dark);
}
.swatch-label {
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 9px;
  font-weight: 500;
  color: var(--color-white);
  background: var(--color-slate);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 5;
}
.swatch-btn:hover .swatch-label { opacity: 1; }

/* -- Accent Areas ------------------------------------------ */
.accent-areas { margin-bottom: 8px; }
.accent-areas label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-slate);
  cursor: pointer;
}
.accent-areas label.disabled { opacity: 0.4; cursor: default; }
.accent-areas label span {
  font-size: 11px;
  font-weight: 400;
  color: var(--color-muted-light);
}
.accent-areas input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--color-border);
  border-radius: 3px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: all var(--transition);
}
.accent-areas input[type="checkbox"]:checked {
  border-color: var(--color-rust);
  background: var(--color-rust);
}
.accent-areas input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 4px;
  height: 7px;
  border: solid var(--color-white);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  margin-top: 1px;
}

/* -- Overview (Step 2 sticky bottom) ----------------------- */
.overview-section {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: auto;
  margin-bottom: 0;
  padding: 10px 20px 8px;
  background: var(--color-dust);
  border-top: 1px solid var(--color-border);
  box-shadow: var(--shadow-up);
}
.overview-title {
  margin: 0 0 6px;
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
}
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.ov-item {
  padding: 6px 8px;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  font-size: 10px;
}
.ov-label {
  color: var(--color-muted);
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.06em;
  font-size: 8px;
}
.ov-value {
  color: var(--color-rust);
  font-weight: 500;
  margin-top: 2px;
}

/* -- Footer Bar -------------------------------------------- */
.footer-bar {
  height: var(--footer-bar-h);
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  box-shadow: var(--shadow-up);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 24px;
  flex-shrink: 0;
}
.footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.footer-btn--ghost {
  background: none;
  color: var(--color-muted);
}
.footer-btn--ghost svg { opacity: 0.5; }
.footer-btn--primary {
  background: var(--color-pine-dark);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}
.footer-btn--primary:hover:not(:disabled) { background: var(--color-pine-hover); box-shadow: var(--shadow-md); }
.footer-btn--primary svg { opacity: 0.8; }
.footer-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.footer-btn--ghost:hover:not(:disabled) { color: var(--color-slate); background: var(--color-dust); }

/* -- Flooring Step ----------------------------------------- */
.flooring-size-box {
  margin: 0 20px 8px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  box-shadow: var(--shadow-xs);
}
.flooring-size-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}
.flooring-size-row + .flooring-size-row {
  border-top: 1px solid var(--color-border);
}
.flooring-size-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.flooring-size-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-pine-dark);
}
.flooring-note {
  margin: 0 20px 6px;
  font-size: 13px;
  line-height: 1.4;
}
.flooring-options {
  margin: 0 20px 10px;
}
.radio-sub-text {
  font-size: 13px;
  color: var(--color-muted-light);
  margin: -4px 0 6px 22px;
  font-weight: 400;
}

/* -- Jobsite Step ------------------------------------------ */
.jobsite-desc {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}
.jobsite-body {
  padding: 0 20px 10px;
}
.jobsite-question {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-slate);
  margin: 14px 0 8px;
  line-height: 1.4;
}
.jobsite-question:first-child {
  margin-top: 0;
}
.callout-box,
.legal-box {
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.callout-box p,
.legal-box p {
  line-height: 1.5;
  margin: 0;
}
.callout-box p + p,
.legal-box p + p {
  margin-top: 4px;
}
.callout-box strong,
.legal-box strong {
  font-weight: 600;
}
.callout-box {
  background: var(--color-callout-bg);
  border: 1px solid var(--color-callout-border);
  margin-bottom: 12px;
}
.callout-box p {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-callout-text);
}

/* -- Lightbox ---------------------------------------------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 10, 10, 0.85);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.active {
  display: flex;
}
.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  background: var(--color-white);
}
.lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--color-white);
  color: var(--color-slate);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: background var(--transition);
}
.lightbox__close:hover {
  background: var(--color-dust);
}
.field--error {
  outline: 2px solid var(--color-error);
  outline-offset: 2px;
  animation: shake 0.3s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}
.legal-box {
  background: var(--color-dust);
  border: 1px solid var(--color-border);
  margin-top: 14px;
}
.legal-box p {
  font-size: 13px;
  color: var(--color-muted-light);
}
.legal-box strong {
  color: var(--color-muted);
}

/* -- Estimate Step ----------------------------------------- */
.estimate-hero {
  background: var(--color-pine-dark);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 14px;
}
.estimate-hero__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 2px;
}
.estimate-hero__amount {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: var(--color-white);
}
.estimate-desc {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 6px;
}
.estimate-desc:last-of-type {
  margin-bottom: 16px;
}
.estimate-section {
  margin-bottom: 18px;
}
.estimate-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-pine-dark);
  padding-bottom: 5px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 8px;
}
.estimate-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 14px;
  gap: 8px;
}
.estimate-line-name {
  color: var(--color-slate);
  font-weight: 400;
  flex: 1;
  min-width: 0;
}
.estimate-line-price {
  font-weight: 500;
  color: var(--color-pine-dark);
  white-space: nowrap;
}
.estimate-line-price--discount {
  color: var(--color-discount);
}
.estimate-line-price-group {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.estimate-line-remove {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
  color: var(--color-muted-light);
  line-height: 1;
  transition: color var(--transition);
}
.estimate-line-remove:hover {
  color: var(--color-resin);
}
.estimate-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 10px 0;
}
.estimate-summary-line {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 14px;
}
.estimate-summary-line span:first-child {
  font-weight: 500;
  color: var(--color-muted);
}
.estimate-summary-line span:last-child {
  font-weight: 600;
  color: var(--color-pine-dark);
}
.estimate-summary-line--total {
  font-size: 17px;
  padding: 8px 0 4px;
  border-top: 2px solid var(--color-pine-dark);
  margin-top: 6px;
}
.estimate-summary-line--total span:first-child {
  font-weight: 700;
  color: var(--color-pine-dark);
}
.estimate-summary-line--total span:last-child {
  font-weight: 700;
  color: var(--color-pine-dark);
  font-size: 20px;
}
.estimate-deposit-box {
  margin-top: 10px;
  padding-top: 6px;
}
.estimate-deposit-line {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 14px;
}
.estimate-deposit-line span:first-child {
  color: var(--color-muted);
  font-weight: 500;
}
.estimate-deposit-line span:last-child {
  color: var(--color-pine-dark);
  font-weight: 600;
}
.estimate-jobsite-summary {
  margin-bottom: 4px;
}
.estimate-jobsite-item {
  margin: 0 0 10px;
}
.estimate-jobsite-q {
  display: block;
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.5;
}
.estimate-jobsite-a {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-slate);
  text-decoration: underline;
  margin-top: 1px;
}
.estimate-disclaimer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
}
.estimate-disclaimer p {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.6;
  margin: 0 0 8px;
}
.estimate-disclaimer strong {
  font-weight: 600;
  color: var(--color-slate);
  font-style: italic;
}
.estimate-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.estimate-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 0;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  background: var(--color-pine-dark);
  color: var(--color-white);
  transition: background var(--transition);
  box-shadow: var(--shadow-sm);
}
.estimate-submit-btn:hover { background: var(--color-pine-hover); }
.estimate-submit-btn svg { opacity: 0.8; }

/* -- Style Picker Overlay ---------------------------------- */
.style-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 1;
  transition: opacity 0.25s ease;
}
.style-picker-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.style-picker {
  position: relative;
  width: min(860px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  padding: 32px 36px 36px;
  font-family: var(--font-family);
}

.style-picker__title {
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  color: var(--color-slate);
  margin: 0 0 24px;
  letter-spacing: 0.01em;
}

.style-picker__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.style-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}
.style-card:hover {
  border-color: var(--color-muted-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.style-card:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.style-card__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 3px;
  background: var(--color-dust);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 12px;
}
.style-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.style-card__img-placeholder {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted-light);
  letter-spacing: 0.04em;
}

.style-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-slate);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.style-card__desc {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-muted);
  line-height: 1.4;
  margin-bottom: 2px;
}

.style-card__price {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-pine-dark);
  margin-top: 6px;
}

.style-card--disabled:hover {
  transform: none;
  box-shadow: var(--shadow-xs);
}
.style-card__badge {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* -- Responsive: Tablet ------------------------------------ */
@media (max-width: 1024px) {
  :root { --sidebar-width: 320px; }
  .step-tab { padding: 0 8px; font-size: 10px; }
  .style-picker__grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .style-picker { padding: 24px 28px 28px; }
  .style-picker__title { font-size: 14px; }
}

/* -- Responsive: Mobile ------------------------------------ */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 100%;
    --logo-bar-h: 46px;
    --tabs-bar-h: 38px;
    --info-bar-h: 30px;
    --footer-bar-h: 36px;
  }

  .info-bar { font-size: 10px; padding: 0 12px; }

  .logo-bar { padding: 0 12px; }
  .logo-bar__logo { height: 20px; }
  .logo-bar__btn { font-size: 10px; }

  .step-tabs-bar { justify-content: flex-start; padding: 0 12px; }
  .step-tabs { gap: 0; }
  .step-tab { padding: 0 6px; font-size: 9px; }
  .step-tab-sep { font-size: 8px; padding: 0 1px; }

  .viewer-price { top: 8px; padding: 4px 10px; }
  .viewer-price__amount { font-size: 11px; }
  .viewer-price__sub { font-size: 8px; }
  .viewer-price__sep { font-size: 8px; margin: 0 4px; }

  .app {
    flex-direction: column;
    height: calc(100vh - var(--info-bar-h) - var(--logo-bar-h) - var(--tabs-bar-h));
    height: calc(100dvh - var(--info-bar-h) - var(--logo-bar-h) - var(--tabs-bar-h));
  }
  .viewer-area { height: 40%; flex: none; }
  .sidebar {
    width: 100%;
    min-width: 100%;
    height: 60%;
    border-left: none;
    border-top: 1px solid var(--color-border);
  }

  .sidebar-header { padding: 8px 12px 6px; }
  .sidebar-header h2 { font-size: 11px; }
  .sidebar-header p { font-size: 8.5px; }

  .step-panel { padding-top: 4px; padding-bottom: 4px; }
  .acc-section { padding: 0 8px; margin-bottom: 10px; }
  .acc-header { padding: 6px 10px; }
  .acc-header span:first-child { font-size: 9.5px; }
  .acc-body { padding: 6px 8px 8px; }
  .wall-card { margin-bottom: 10px; }
  .wall-card__trigger { padding: 6px 10px; font-size: 9.5px; }
  .wall-card__body { padding: 6px 8px 8px; }
  .add-row { padding: 4px 5px; }
  .add-row__label { font-size: 10px; }
  .accessory-list__title { padding: 6px 10px; font-size: 9.5px; }
  .accessory-list__body { padding: 6px 8px 8px; }
  .accessory-list__item { font-size: 10px; }
  .s1-body { padding: 10px 12px; }

  .field { margin-bottom: 8px; }
  .field label { font-size: 9px; }
  .field select { padding: 6px 8px; font-size: 10px; }
  .radio-group-s1 label { padding: 5px 9px; font-size: 10px; }
  .style-grid { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .style-grid-card { grid-template-rows: auto 21px auto auto auto; row-gap: 1px; padding: 6px 5px 6px; }
  .style-grid-card__name { font-size: 7.5px; min-height: 19px; }
  .style-grid-card__desc { font-size: 6.8px; min-height: 9px; }
  .style-grid-card__price { font-size: 9px; margin-top: 0; }
  .style-grid-card__img { margin-bottom: 4px; aspect-ratio: 1 / 1; }
  .style-grid-card__img-ph { font-size: 8px; }
  .style-grid-card__check { width: 14px; height: 14px; top: 3px; right: 3px; }
  .style-grid-card__check svg { width: 8px; height: 8px; }
  .style-grid-card__badge { font-size: 6.5px; margin-top: 2px; }
  .radio-item { font-size: 10px; padding: 4px 5px; gap: 6px; }
  .radio-item input[type="radio"] { width: 12px; height: 12px; }
  .radio-item input[type="radio"]:checked::after { width: 5px; height: 5px; }
  .step-label { font-size: 9.5px; }
  .section-desc { font-size: 10px; }
  .swatch-selected { font-size: 10px; }
  .placement-btn { padding: 6px 8px; font-size: 10px; }

  .overview-section {
    position: relative;
    padding: 6px 12px 4px;
  }
  .overview-title { font-size: 8px; margin-bottom: 4px; }
  .overview-grid { gap: 4px; }
  .ov-item { padding: 4px 6px; font-size: 9px; }
  .ov-label { font-size: 7px; }

  .step-nav { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); gap: 6px; }
  .step-nav button { padding: 6px 0; font-size: 10px; }

  .footer-bar { gap: 6px; padding: 0 10px; }
  .footer-btn { padding: 5px 12px; font-size: 10px; gap: 4px; }
  .footer-btn svg { width: 14px; height: 14px; }

  .section-title { font-size: 10.5px; }
  .tooltip-trigger { width: 12px; height: 12px; font-size: 8px; }
  .flooring-size-box { margin: 0 12px 6px; padding: 8px 10px; }
  .flooring-size-label { font-size: 9.5px; }
  .flooring-size-value { font-size: 10px; }
  .flooring-note { margin: 0 12px 8px; font-size: 9.5px; }
  .radio-sub-text { font-size: 9.5px; margin-left: 20px; }
  .callout-box { padding: 8px 10px; }
  .callout-box p { font-size: 10px; }
  .legal-box { padding: 8px 10px; }
  .legal-box p { font-size: 9.5px; }
  .jobsite-body { padding: 0 12px 8px; }
  .jobsite-question { font-size: 10px; margin: 10px 0 6px; }
  .flooring-options { margin: 0 12px 8px; }
  .estimate-hero { padding: 10px 14px; }
  .estimate-hero__label { font-size: 9px; }
  .estimate-hero__amount { font-size: 17px; }
  .estimate-desc { font-size: 10px; }
  .estimate-section-title { font-size: 10px; }
  .estimate-line { font-size: 9px; }
  .estimate-summary-line { font-size: 9.5px; }
  .estimate-summary-line--total span:last-child { font-size: 13px; }
  .estimate-submit-btn { padding: 10px 0; font-size: 10px; }
  .estimate-disclaimer p { font-size: 10px; }
  .estimate-jobsite-q { font-size: 9.5px; }
  .estimate-jobsite-a { font-size: 10px; }

  .style-picker { padding: 20px 16px 24px; width: min(96vw, 400px); max-height: 85vh; }
  .style-picker__title { font-size: 13px; margin-bottom: 16px; }
  .style-picker__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .style-card { padding: 10px 8px 10px; }
  .style-card__img { margin-bottom: 8px; }
  .style-card__name { font-size: 9.5px; }
  .style-card__desc { font-size: 8.5px; }
  .style-card__price { font-size: 9px; }
}

@media (max-width: 480px) {
  .step-tab { padding: 0 4px; font-size: 8px; letter-spacing: 0.04em; }
  .step-tab-sep { display: none; }
  .swatch-grid { gap: 3px; }
  .swatch-btn { width: 26px; height: 26px; }
  .footer-btn--ghost span { display: none; }
  .logo-bar__actions { gap: 8px; }
  .logo-bar__btn span { display: none; }
  .acc-section { margin-bottom: 8px; }
  .wall-card { margin-bottom: 8px; }
  .wall-card__trigger { padding: 5px 8px; font-size: 9px; }
  .sidebar-header { padding: 6px 10px 4px; }
  .sidebar-header h2 { font-size: 10px; }
  .style-grid { gap: 4px; }
  .style-grid-card { grid-template-rows: auto 20px auto auto auto; row-gap: 1px; padding: 5px 4px 5px; }
  .style-grid-card__name { font-size: 7px; min-height: 18px; }
  .style-grid-card__desc { font-size: 6.2px; min-height: 8px; }
  .style-grid-card__price { font-size: 8px; margin-top: 0; }
}

/* -- Accessories: wall selector ------------------------------ */
.wall-status {
  margin: 0 0 10px;
  padding: 8px 12px 8px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-resin);
  background: var(--color-pine-light);
  color: var(--color-slate);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.wall-status strong {
  font-weight: 700;
  color: var(--color-pine-dark);
}

.wall-panels {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.wall-card { margin-bottom: 14px; }
.wall-card:first-child { margin-top: 2px; }
.wall-card--collapsed .wall-card__body { display: none; }

.wall-card__trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--color-pine-dark);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  user-select: none;
  text-align: left;
  transition: background var(--transition);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-white);
}
.wall-card__trigger:hover { background: var(--color-pine-hover); }
.wall-card__help { margin: 0 0 8px; font-size: 13px; color: var(--color-muted); }

/* -- Accessories: add-row ------------------------------------ */
.add-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
}
.add-row:hover { background: var(--color-dust); }
.add-row__label { font-size: 14px; font-weight: 500; color: var(--color-slate); }
.add-row__note  { margin-top: 1px; font-size: 11px; color: var(--color-muted); }

.btn-add {
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-pine-dark);
  border: 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.btn-add:hover { background: var(--color-pine-hover); }
.btn-add:disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

/* -- Shared accessory modal (picker + editor) --------------- */
.acc-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.22s ease;
}
.acc-modal--editor { z-index: 1001; }
.acc-modal.hidden { opacity: 0; pointer-events: none; }
.acc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.acc-modal__card {
  position: relative;
  width: min(400px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  background: var(--color-white);
  box-shadow: var(--shadow-modal);
  transform: scale(1);
  opacity: 1;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.18s ease;
  display: flex;
  flex-direction: column;
}
.acc-modal.hidden .acc-modal__card { transform: scale(0.94); opacity: 0; }
.acc-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: var(--color-pine-dark);
  flex-shrink: 0;
}
.acc-modal__title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-white);
}
.acc-modal__subtitle {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}
.acc-modal__close {
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: var(--color-white);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition);
}
.acc-modal__close:hover { background: rgba(255,255,255,0.22); }
.acc-modal__header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.acc-modal__delete {
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(192,57,43,0.5);
  color: var(--color-white);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.acc-modal__delete:hover { background: rgba(192,57,43,0.75); }
.acc-modal__delete svg { width: 14px; height: 14px; }
.acc-modal__body { padding: 16px 18px 18px; overflow-y: auto; flex: 1; }

/* -- Picker option rows -------------------------------------- */
.acc-modal__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}
.acc-modal__option:last-child { border-bottom: 0; }
.acc-modal__option-info  { flex: 1; min-width: 0; }
.acc-modal__option-label { font-size: 14px; font-weight: 600; color: var(--color-slate); }
.acc-modal__option-size  { margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--color-muted); }
.acc-modal__option-price { flex-shrink: 0; font-size: 14px; font-weight: 600; color: var(--color-pine-dark); white-space: nowrap; padding: 0 8px; }
.acc-modal__option-note  { margin-top: 1px; font-size: 12px; color: var(--color-muted); }

/* -- Accessories: editor sections & toggles ------------------ */
.editor-section + .editor-section { margin-top: 18px; }
.editor-section__title {
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.editor-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--color-border);
}
.editor-section .editor-toggle:first-of-type { border-top: 0; }
.editor-toggle__label { display: block; font-size: 14px; font-weight: 600; color: var(--color-slate); }
.editor-toggle__note  { display: block; margin-top: 2px; font-size: 12px; color: var(--color-muted); }
.editor-toggle__price { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--color-error); }
.editor-toggle input[type="checkbox"],
.editor-toggle input[type="radio"] { width: 16px; height: 16px; accent-color: var(--color-pine-dark); }
.editor-toggle.is-disabled {
  opacity: 0.45;
}
.editor-toggle.is-disabled .editor-toggle__label {
  color: var(--color-muted);
  font-weight: 500;
}


/* -- Accessories: edit overlay button (on 3D viewer) --------- */
.acc-edit-overlay {
  position: fixed;
  z-index: 200;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--color-rust);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.acc-edit-overlay:hover { filter: brightness(0.94); }
.acc-edit-overlay svg { width: 18px; height: 18px; fill: currentColor; }
.acc-edit-overlay.hidden { display: none; }

/* -- Accessories: overlap warning icon (on 3D viewer) -------- */
.acc-overlap-warning {
  position: fixed;
  z-index: 210;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #f04e23;
  color: var(--color-white);
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-md);
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.acc-overlap-warning.hidden { display: none; }
.acc-overlap-warning svg { width: 24px; height: 24px; fill: currentColor; }
.acc-overlap-warning--jump { animation: acc-overlap-warning-jump 420ms ease-out; }

.acc-overlap-toast {
  position: absolute;
  bottom: calc(var(--footer-bar-h) + 16px);
  left: 50%;
  z-index: 220;
  width: max-content;
  max-width: min(560px, calc(100% - 24px));
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(240, 78, 35, 0.24);
  background: rgba(255, 248, 244, 0.97);
  color: #8a3118;
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  transform: translate(-50%, -8px);
  opacity: 0;
  pointer-events: none;
}
.acc-overlap-toast.hidden { display: none; }
.acc-overlap-toast--show { animation: acc-overlap-toast-show 2800ms ease; }

@keyframes acc-overlap-warning-jump {
  0% { transform: translate(-50%, -50%) scale(1); }
  35% { transform: translate(-50%, calc(-50% - 10px)) scale(1.14); }
  65% { transform: translate(-50%, -50%) scale(0.96); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes acc-overlap-toast-show {
  0% { opacity: 0; transform: translate(-50%, -8px); }
  10% { opacity: 1; transform: translate(-50%, 0); }
  82% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -8px); }
}

@media (max-width: 768px) {
  .acc-overlap-toast {
    bottom: calc(var(--footer-bar-h) + 10px);
    max-width: calc(100% - 16px);
    padding: 9px 12px;
    font-size: 12px;
  }
}

/* -- Accessories: alert & empty states ----------------------- */
.acc-alert {
  margin-top: 10px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--color-resin);
  background: rgba(225, 103, 60, 0.08);
  border: 1px solid rgba(225, 103, 60, 0.3);
  border-radius: var(--radius-sm);
}
.acc-alert.hidden { display: none; }
.acc-empty {
  margin: 0;
  padding: 8px 0;
  font-size: 13px;
  font-style: italic;
  color: var(--color-muted);
}

/* -- Accessories: list --------------------------------------- */
.accessory-list {
  margin-top: 4px;
}
.accessory-list__title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--color-pine-dark);
  box-shadow: var(--shadow-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 4px;
}
.accessory-list__body { padding: 8px 12px 12px; }
.accessory-list__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 6px;
  font-size: 14px;
  border-bottom: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.accessory-list__item:last-child { border-bottom: none; }
.accessory-list__item:hover { background: var(--color-dust); }
.accessory-list__item--selected {
  background: var(--color-pine-light);
  border-left: 3px solid var(--color-resin);
}
.accessory-list__item--selected:hover { background: var(--color-pine-light); }
.accessory-list__label {
  font-weight: 500;
  color: var(--color-slate);
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.accessory-list__options {
  flex-basis: 100%;
  font-size: 11px;
  font-weight: 400;
  color: #999;
  line-height: 1.3;
}
.accessory-list__price {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-pine-dark);
  white-space: nowrap;
}
.accessory-list__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.btn-edit-accessory,
.btn-delete-accessory {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-muted);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
.btn-edit-accessory:hover { color: var(--color-pine-dark); border-color: var(--color-pine-dark); }
.btn-delete-accessory:hover { color: var(--color-resin); border-color: var(--color-resin); }
.btn-delete-accessory:disabled,
#editor-remove-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  border-style: dashed;
}

/* ============================================================
   Quote Submission Modal
   ============================================================ */

.quote-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.22s ease;
}
.quote-modal.hidden { opacity: 0; pointer-events: none; }
.quote-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.quote-modal__card {
  position: relative;
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  background: var(--color-white);
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  transform: scale(1);
  opacity: 1;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.18s ease;
}
.quote-modal.hidden .quote-modal__card { transform: scale(0.94); opacity: 0; }
.quote-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 20px;
  background: var(--color-pine-dark);
  flex-shrink: 0;
}
.quote-modal__title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-white);
}
.quote-modal__subtitle {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
}
.quote-modal__close {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: var(--color-white);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition);
}
.quote-modal__close:hover { background: rgba(255,255,255,0.22); }
.quote-modal__body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* -- Form sections ----------------------------------------- */
.qf-section {
  border: none;
  padding: 0;
  margin: 0 0 16px;
}
.qf-legend {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-slate);
  margin-bottom: 8px;
  display: block;
}
.qf-field { margin-bottom: 10px; }
.qf-field:last-child { margin-bottom: 0; }

.qf-input, .qf-select, .qf-textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--color-slate);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition);
  box-sizing: border-box;
}
.qf-input:focus, .qf-select:focus, .qf-textarea:focus {
  border-color: var(--color-pine-dark);
}
.qf-input.qf-invalid { border-color: var(--color-error); }
.qf-textarea { resize: vertical; min-height: 60px; }
.qf-select { cursor: pointer; appearance: auto; }

/* -- Layout rows ------------------------------------------- */
.qf-row { display: flex; gap: 10px; }
.qf-row--2col > .qf-field { flex: 1; }
.qf-row--3col > .qf-field { flex: 1; }
.qf-row--3col > .qf-field:nth-child(2) { flex: 0.8; }

/* -- Delivery toggle --------------------------------------- */
.qf-toggle-row { margin-bottom: 10px; }
.qf-toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-slate);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.qf-toggle-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--color-pine-dark);
  cursor: pointer;
}
.qf-delivery-fields { margin-top: 10px; }

/* -- Radio options ----------------------------------------- */
.qf-radio {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--color-slate);
  cursor: pointer;
  margin-bottom: 6px;
  line-height: 1.4;
}
.qf-radio:last-child { margin-bottom: 0; }
.qf-radio input[type="radio"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--color-pine-dark);
}

/* -- Feedback messages ------------------------------------- */
.qf-error {
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--color-error);
  background: rgba(162,61,61,0.08);
  border: 1px solid rgba(162,61,61,0.2);
  border-radius: var(--radius-sm);
}
.qf-success {
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--color-pine-dark);
  background: rgba(48,59,25,0.08);
  border: 1px solid rgba(48,59,25,0.2);
  border-radius: var(--radius-sm);
}
.qf-error.hidden, .qf-success.hidden { display: none; }

/* -- Submit button ----------------------------------------- */
.qf-submit {
  width: 100%;
  padding: 12px;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--color-white);
  background: var(--color-slate);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.qf-submit:hover { background: #2a2a2a; }
.qf-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* -- Responsive -------------------------------------------- */
@media (max-width: 520px) {
  .quote-modal__card { width: calc(100vw - 16px); }
  .quote-modal__body { padding: 16px; }
  .qf-row--2col, .qf-row--3col { flex-direction: column; gap: 0; }
}
