/* Eurosandoor family styling. Existing product controls retain their behavior. */
:root {
  --bg: #f5f5f3; --text: #191919; --primary: #f58216; --primary-dark: #e87309;
  --brand-color: #f58216; --border: #e4e4df; --muted: #74746e;
  --info-bg: #fff5e9; --info-accent: #f58216;
}
[hidden], .stage-hidden { display: none !important; }
html, body { height: auto; min-height: 100%; max-height: none; overflow: visible; }
body { display: block; background: var(--bg); color: var(--text); font-family: 'Garet', Arial, sans-serif; }
button, input, select, textarea { font-family: inherit; }
button, a, input, select, [role="button"] { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #a64c00; outline-offset: 4px; }
.navbar { min-height: 88px; padding: 12px max(28px, calc((100vw - 1424px) / 2)); gap: 24px; background: #151515; box-shadow: none; border: 0; }
.navbar .navbar-brand { order: 0; margin: 0; flex-shrink: 0; }
.navbar .logo { height: 56px; max-width: 170px; width: 170px; object-fit: contain; }
.header-product { border-left: 1px solid #3c3c3a; padding-left: 24px; color: #c6c6c0; font-size: 13px; }
.header-help { margin-left: auto; font-size: 13px; color: #f58216; white-space: nowrap; }
.navbar .language-selector { order: 0; margin: 0; }
.navbar .language-selector select { background: #252525; color: white; border-color: #41413e; min-height: 42px; }
.workspace-heading { max-width: 1376px; margin: 36px auto 34px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.eyebrow { font-size: 12px; letter-spacing: .15em; font-weight: 800; color: #994800; margin: 0 0 12px; }
.workspace-heading h1 { font-size: 26px; line-height: 1.25; letter-spacing: -.8px; margin: 0 0 12px; }
.workspace-heading p:not(.eyebrow) { color: var(--muted); font-size: 14px; margin: 0; line-height: 1.6; }
.workspace-tag { border: 1px solid var(--border); border-radius: 30px; padding: 10px 16px; font-size: 12px; color: #66665f; white-space: nowrap; }
.stage-nav { display: flex; max-width: 1376px; margin: 0 auto 24px; border-bottom: 1px solid var(--border); }
.stage-nav button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px 6px; background: none; border: 0; border-bottom: 3px solid transparent; color: #696963; font-size: 12px; cursor: pointer; }
.stage-number { width: 27px; height: 27px; display: grid; place-items: center; flex-shrink: 0; background: #242422; color: white; border-radius: 50%; font-size: 12px; }
.stage-nav .is-current { color: #191919; font-weight: 800; border-bottom-color: var(--primary); }
.is-current .stage-number { background: var(--primary); color: #191919; }
#configurator-root { align-items: flex-start; width: calc(100% - 64px); max-width: 1376px; height: auto; margin: 0 auto 48px; background: white; border: 1px solid var(--border); border-radius: 18px; overflow: visible; box-shadow: 0 10px 30px #24242003; }
.preview-column { width: 58%; flex: 0 0 58%; position: sticky; top: 24px; min-width: 0; border-radius: 18px 0 0 0; overflow: hidden; }
.config-visual { display: block; position: relative; width: 100%; height: clamp(330px, 37vw, 550px); background: #eae8e1; }
#gateCanvas { width: 100%; height: 100%; }
.preview-heading { position: absolute; top: 22px; left: 24px; right: 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; pointer-events: none; }
.preview-heading > span { font-size: 11px; color: #6b6a62; }
.preview-toggle { position: absolute; display: flex; align-items: center; gap: 9px; top: 57px; right: 20px; width: auto; height: 40px; min-width: 40px; padding: 0 15px; border: 1px solid #ffffff88; border-radius: 30px; background: #ffffffed; box-shadow: none; color: #66665e; font-size: 12px; cursor: pointer; z-index: 2; }
.config-visual.is-expanded { position: fixed; inset: 24px; width: calc(100vw - 48px); height: calc(100dvh - 48px); z-index: 1200; border-radius: 16px; box-shadow: 0 0 0 30px #191919bb; }
.preview-column:has(.is-expanded) { position: static; overflow: visible; }
.preview-note { display: flex; gap: 12px; margin: 0; padding: 16px 22px; border-left: 3px solid var(--primary); background: var(--info-bg); color: #7a6854; font-size: 12px; line-height: 1.7; }
.preview-note > span:first-child { font-size: 19px; color: #b65700; }
.preview-summary { padding: 24px; background: #fafaf7; }
.preview-summary-heading { display: flex; justify-content: space-between; font-size: 12px; gap: 10px; margin-bottom: 20px; }
.preview-summary-heading > span { font-size: 10px; color: var(--muted); }
#preview-summary-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.preview-summary-item { text-align: left; background: none; border: 0; border-right: 1px solid var(--border); padding: 0 14px; display: flex; flex-direction: column; gap: 9px; cursor: pointer; min-width: 0; }
.preview-summary-item:first-child { padding-left: 0; }
.preview-summary-item:last-child { border: 0; padding-right: 0; }
.preview-summary-item > span:first-child { font-size: 10px; color: #72726b; }
.preview-summary-item strong { font-size: 11px; line-height: 1.6; }
.summary-edit { color: #a3500b; font-size: 10px; font-weight: 400; }
.arrangement { background: #fafaf7; border-top: 1px solid var(--border); padding: 18px 24px; font-size: 12px; }
.arrangement summary { cursor: pointer; font-weight: 700; }
.arrangement p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.arrangement .order-container { position: static; width: 100%; height: auto; min-height: 0; margin: 14px 0 0; border: 0; padding: 0; background: transparent; gap: 8px; }
.arrangement .order-image-container { min-width: 90px; height: 68px; background: white; border: 1px solid var(--border); }
.arrangement .newFenceButtonInOrder { background: white; color: #a3500b; border: 1px dashed #c8c8bf; border-radius: 8px; min-width: 44px; height: 68px; }
.config-panel { flex: 0 0 42%; max-width: 42%; min-width: 0; background: white; padding: 32px; border-radius: 0 18px 18px 0; overflow: visible; scroll-margin-top: 20px; }
.stage-heading { border-bottom: 1px solid #eeeee8; padding-bottom: 26px; margin-bottom: 8px; }
.stage-heading h2 { text-align: left; font-size: 27px; letter-spacing: -.8px; margin: 0 0 12px; line-height: 1.25; }
.stage-heading p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0; }
.section { margin: 0; border-bottom: 1px solid #eeeee8; }
.section-button, .section.open .section-button { background: white; border: 0; border-radius: 0; padding: 22px 0; gap: 12px; color: #191919; min-height: 65px; box-shadow: none; }
.section-button-title { font-size: 13px; flex-shrink: 0; max-width: 58%; }
.section.open > .section-button .bold { color: #994800; }
.step-info { font-size: 10px; color: #7b7b73; text-align: right; font-weight: 400; line-height: 1.5; margin-left: auto; overflow-wrap: anywhere; }
.collapsabble-container { border: 0; background: white; }
.section.open .collapsabble-container { height: auto; padding: 0 0 22px; border-radius: 0; }
.collapsabble-container hr { border: 0; border-top: 1px solid #eeeee8; margin: 18px 0; }
.container-title { font-size: 12px; color: #191919; margin: 14px 0; }
.field-help { font-size: 12px; line-height: 1.75; color: var(--muted); margin: 6px 0 18px; }
.option-description { font-weight: 400; font-size: 10px; color: #74746b; line-height: 1.55; text-align: center; }
.card, .card:hover, .card.active { position: relative; padding: 16px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; gap: 12px; transition: border-color .15s, background .15s; background: white; min-width: 0; }
.card:hover { border-color: #bdbdb3; background: #fafaf7; }
.card.active { border-color: var(--primary); background: #fff5e9; box-shadow: inset 0 0 0 1px var(--primary); }
.card.active::before { content: '✓'; position: absolute; top: 7px; left: 7px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); color: #191919; font-size: 11px; }
.card label { font-size: 12px; pointer-events: none; }
.card img { max-width: 80%; height: 60px; max-height: 80px; object-fit: contain; margin: 8px auto 0; }
.card i { font-size: 24px; color: #65655b; }
.card.active i { color: #a65308; }
.two-in-row { gap: 10px; width: 100%; }
#sec-gate .two-in-row { display: grid !important; grid-template-columns: repeat(3, minmax(0,1fr)); }
#con-material, #con-orientation { gap: 12px; }
.input-title { display: block; font-size: 12px; color: #191919; margin: 16px 0 8px; font-weight: 700; }
.config-panel input:not([type="checkbox"]), .config-panel select, .config-panel textarea { background: #fff; color: #333; border: 1px solid #dcdcd5; border-radius: 7px; min-height: 46px; padding: 10px 12px; box-shadow: none; width: 100%; font-size: 14px; }
.dimension-help { display: block; margin-top: 6px; font-size: 10px; color: #74746e; }
.custom-select { margin: 0; }
.custom-select::after { color: #777; }
.switch__track { background: #d8d8d1; box-shadow: none; }
.switch input:checked + .switch__track { background: var(--primary); }
.gate-details-link { font-size: 11px; color: #a3500b; padding: 0; margin-top: 18px; display: inline-block; text-decoration: underline; }
#sec-color h2 { text-align: left; font-size: 12px; margin: 14px 0; }
#additionalColorsBtn { background: #f6f6f2; border: 1px solid var(--border); padding: 12px; border-radius: 7px; }
#sec-services { padding-bottom: 22px; }
#service-cards { display: grid !important; grid-template-columns: 1fr 1fr; }
#service-cards .card { min-height: 105px; font-size: 12px; text-align: center; }
.stage-actions { display: flex; gap: 12px; padding: 20px 0 0; margin-top: 12px; background: white; }
.primary-button, .hn-submit-btn, .button.next-button { background: var(--primary); color: #171713; border: 0; border-radius: 7px; padding: 15px 18px; font-size: 13px; font-weight: 800; cursor: pointer; min-height: 46px; margin: 0; box-shadow: none; }
.stage-actions .primary-button { flex: 1; width: auto; }
.primary-button:hover, .hn-submit-btn:hover { background: var(--primary-dark); transform: none; }
.secondary-button, .back-btn { border: 0; border-radius: 7px; padding: 13px 17px; background: #f0f0ea; color: #272722; font-size: 13px; font-weight: 700; cursor: pointer; }
.hn-form-container { padding: 0; border: 0; background: white; box-shadow: none; max-width: none; margin: 0; }
#formContainer { display: flex; flex-direction: column; }
#formContainer .back-btn { margin: 0 0 20px; }
#formContainer h3 { font-size: 17px; margin: 26px 0 20px; }
.summary-row { display: grid; grid-template-columns: 1fr 1.25fr; gap: 8px 20px; width: 100%; text-align: left; padding: 16px 0; background: white; border: 0; border-bottom: 1px solid #eeeee8; cursor: pointer; }
.summary-row > span:first-child { font-size: 11px; color: #72726a; }
.summary-row strong { font-size: 11px; text-align: right; line-height: 1.6; overflow-wrap: anywhere; }
.summary-row .summary-edit { grid-column: 2; text-align: right; }
.quote-note { border-left: 2px solid var(--primary); background: var(--info-bg); color: #7a6854; font-size: 12px; line-height: 1.7; padding: 16px; margin-top: 24px; }
#stage-error { color: #9b2c22; background: #fff1ed; padding: 14px; border-radius: 6px; font-size: 13px; line-height: 1.6; }
.hn-submit-btn { width: 100%; }
.chat-button { width: 44px; height: 44px; font-size: 18px; bottom: 20px; right: 20px; background: #252522; color: white; box-shadow: 0 3px 14px #0002; }
.chat-window { bottom: 76px; }
body.showing-results .stage-nav, body.showing-results .workspace-heading { display: none; }
@media (max-width: 1450px) {
  .workspace-heading, .stage-nav { margin-left: 32px; margin-right: 32px; }
}
@media (max-width: 1100px) {
  .config-panel { padding: 24px; flex-basis: 46%; max-width: 46%; }
  .preview-column { flex-basis: 54%; width: 54%; }
  .stage-nav button { font-size: 11px; gap: 7px; }
  .stage-heading h2 { font-size: 24px; }
  .preview-summary { padding: 20px; }
}
@media (max-width: 800px) {
  html, body { height: auto; min-height: 100%; overflow: visible; }
  .navbar { height: 70px; min-height: 70px; padding: 10px 18px; gap: 12px; }
  .navbar .logo { height: 45px; width: 125px; max-width: 125px; }
  .header-product { display: none; }
  .header-help { font-size: 11px; }
  .navbar .language-selector select { min-width: 68px; font-size: 12px; }
  .workspace-heading { margin: 25px 20px 14px; }
  .workspace-heading h1 { font-size: 22px; }
  .workspace-heading p:not(.eyebrow) { font-size: 12px; }
  .workspace-tag { display: none; }
  .eyebrow { font-size: 10px; }
  .stage-nav { margin: 0 16px 16px; }
  .stage-nav button { padding: 12px 6px; flex: 0 0 auto; }
  .stage-nav button.is-current { flex: 1; }
  .stage-nav button:not(.is-current) > span:last-child { display: none; }
  .stage-number { width: 23px; height: 23px; font-size: 10px; }
  #configurator-root { width: calc(100% - 24px); display: flex; flex-direction: column; margin-bottom: 24px; border-radius: 14px; }
  .preview-column { width: 100%; flex: none; position: static; border-radius: 14px 14px 0 0; }
  .config-visual { height: clamp(230px, 55vw, 380px); min-height: 0; flex: none; }
  .preview-heading { top: 16px; left: 16px; right: 16px; font-size: 11px; }
  .preview-heading > span { font-size: 10px; }
  .preview-toggle { top: 44px; right: 12px; height: 34px; min-width: 34px; padding: 0 11px; font-size: 10px; }
  .preview-note { padding: 12px 16px; font-size: 10px; }
  .preview-summary { padding: 16px; }
  .preview-summary-heading { margin-bottom: 12px; font-size: 11px; }
  .preview-summary-item { padding: 0 10px; gap: 7px; }
  .preview-summary-item strong { font-size: 10px; }
  .arrangement { padding: 14px 16px; }
  .arrangement .order-image-container { min-width: 78px !important; width: 78px !important; flex: 0 0 78px; height: 64px !important; }
  .arrangement .order-image-container .dimensions { display: block; font-size: 9px; }
  .config-panel { flex: none; width: 100%; max-width: 100%; padding: 24px 18px; overflow: visible; border-radius: 0 0 14px 14px; }
  .stage-heading h2 { font-size: 25px; }
  .stage-actions { position: sticky; bottom: 0; z-index: 5; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); margin-bottom: -20px; }
  .config-visual.is-expanded { inset: 10px; width: calc(100vw - 20px); height: calc(100dvh - 20px); }
  .chat-button { bottom: 80px; right: 8px; width: 38px; height: 38px; font-size: 16px; }
  .chat-window { bottom: 126px; max-height: calc(100dvh - 150px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
.section.details-collapsed .collapsabble-container { display: none; }
.section.with-switch > .section-button::after { content: '⌃'; font-size: 16px; color: #77776d; }
.section.with-switch.details-collapsed > .section-button::after { content: '⌄'; }
.section.with-switch:not(.open) > .section-button::after { content: ''; }
.switch-container { flex-shrink: 0; }
.config-visual:not(.is-expanded) { height: var(--scene-height, 380px); }
.preview-summary-heading { list-style: none; cursor: pointer; }
.preview-summary:not([open]) .preview-summary-heading { margin-bottom: 0; }
.preview-summary-heading::-webkit-details-marker { display: none; }
@media (max-width: 800px) {
  .preview-summary-heading::after { content: '+'; color: #a3500b; }
  .preview-summary[open] .preview-summary-heading::after { content: '−'; }
}
#formContainer .back-btn { position: static; inset: auto; display: inline-flex; width: auto; align-self: flex-start; transform: none; }
.preview-zoom { display: none; }
.is-expanded .preview-zoom { display: flex; position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 30px; padding: 5px; background: #fffffff5; box-shadow: 0 4px 20px #0001; white-space: nowrap; }
.preview-zoom button { min-width: 38px; min-height: 38px; background: transparent; border: 0; border-radius: 24px; cursor: pointer; color: #333; font-size: 20px; }
.preview-zoom button:hover { background: #f0f0e9; }
.preview-zoom output { min-width: 44px; text-align: center; font-size: 12px; }
.preview-zoom .zoom-reset { font-size: 11px; padding: 0 12px; border-left: 1px solid var(--border); border-radius: 0; }
.is-expanded #gateCanvas.can-pan { cursor: grab; touch-action: none; }
.is-expanded #gateCanvas.can-pan:active { cursor: grabbing; }
@media (max-width: 400px) {
  .navbar { padding: 10px 14px; gap: 10px; }
  .navbar .logo { width: 108px; max-width: 108px; }
  .header-help { width: 60px; white-space: normal; text-align: right; font-size: 10px; line-height: 1.5; }
  .navbar .language-selector select { min-width: 65px; width: 65px; padding: 8px 5px; }
  .stage-nav button.is-current { min-width: 0; }
  .stage-nav button.is-current > span:last-child { min-width: 0; text-align: left; }
}
/* Guided element setup and visual opening-direction choices. */
.element-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 20px 0 8px; }
.element-nav button { display: flex; align-items: center; gap: 7px; border: 1px solid var(--border); background: #fafaf7; color: #6e6e65; padding: 10px 8px; text-align: left; border-radius: 6px; font-size: 10px; cursor: pointer; }
.element-nav button > span:first-child { display: grid; place-items: center; width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%; background: #eaeae2; font-size: 10px; }
.element-nav .is-current { background: #fff5e9; border-color: var(--primary); color: #191919; font-weight: 700; }
.element-nav .is-current > span:first-child { background: var(--primary); }
.direction-choices { margin: 20px 0 0; padding: 0; border: 0; min-width: 0; }
.direction-choices legend { font-size: 12px; font-weight: 700; padding: 0; }
.direction-choices .field-help { margin: 7px 0 12px; font-size: 11px; }
.direction-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.direction-choice { display: block; position: relative; cursor: pointer; min-width: 0; }
.direction-choice input[type="radio"] { position: absolute; top: 12px; left: 12px; margin: 0; width: 16px; min-height: 16px; height: 16px; accent-color: var(--primary); z-index: 1; cursor: pointer; }
.direction-content { display: flex; align-items: center; flex-direction: column; gap: 8px; height: 100%; padding: 16px 8px; background: white; border: 1px solid var(--border); border-radius: 8px; }
.direction-content svg { width: 96px; height: 76px; color: #494b45; }
.direction-content strong { font-size: 12px; }
.direction-content > span { font-size: 10px; color: #72726b; text-align: center; }
.direction-choice input:checked + .direction-content { background: #fff5e9; border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.direction-choice input:focus-visible + .direction-content { outline: 3px solid #a64c00; outline-offset: 3px; }
.preview-views { display: flex; flex-wrap: wrap; gap: 6px; padding: 16px 20px; background: #f0efe9; }
.preview-views button { border: 1px solid #d9d8ce; background: transparent; color: #6c6b62; border-radius: 20px; padding: 9px 12px; font-size: 10px; cursor: pointer; }
.preview-views button[aria-pressed="true"] { background: white; color: #191919; border-color: #a5a397; font-weight: 700; }
.preview-views button:disabled { opacity: .4; cursor: default; }
.preview-caption { margin: 0; padding: 12px 22px; background: #e8e6dd; color: #6c6b60; font-size: 11px; line-height: 1.6; }
.preview-column { top: 12px; }
@media (max-width: 800px) {
  .preview-views { padding: 12px; gap: 5px; }
  .preview-views button { padding: 8px 9px; font-size: 9px; }
  .preview-caption { padding: 10px 16px; font-size: 10px; }
  .element-nav button { padding: 9px 6px; gap: 5px; font-size: 9px; }
  .direction-content strong { font-size: 11px; }
}
.preview-views button { font-size: 11px; color: #53534d; }
.preview-views button:not(:disabled):hover { border-color: #9d9b8f; background: #fafaf7; }
@media (max-width: 800px) { .preview-views button { font-size: 9px; } }
#sec-fence .fence-panel-card,
#sec-fence .multi-container-child { border: 1px solid var(--border); border-radius: 8px; padding: 18px; margin-top: 20px; background: #fafaf7; }
#sec-fence .multi-container-title { font-size: 13px; color: #994800; font-weight: 700; }
#addNewFence { padding: 13px 16px; border: 1px dashed #c8bda8; background: #fff9ef; color: #994800; border-radius: 7px; font-size: 12px; font-weight: 700; cursor: pointer; width: 100%; margin-top: 16px; }

.arrangement .order-image-container { height: auto !important; min-width: 120px !important; width: 120px !important; flex: 0 0 120px; padding: 8px; gap: 6px; }
.arrangement .order-label { font-size: 11px; font-weight: 700; text-align: center; }
.arrangement .order-image-container img { height: 32px; width: auto; object-fit: contain; }
.arrangement .order-moves { display: flex; gap: 6px; width: 100%; }
.arrangement .order-moves button { flex: 1; min-height: 36px; border: 1px solid var(--border); border-radius: 5px; background: #fafaf7; cursor: pointer; font-size: 18px; }
.arrangement .order-moves button:disabled { opacity: .35; cursor: default; }
.arrangement .order-image-container { display: flex; flex-direction: column; align-items: center; }
.arrangement .order-image-container .dimensions { position: static; transform: none; font-size: 10px; }
