/* Toggle Switch */
.asg-toggle-option {
    display: flex; align-items: center; gap: 12px; cursor: pointer;
    padding: 12px 14px; background: rgba(255,255,255,0.03); border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05); transition: all 0.2s; margin-bottom: 16px;
}
.asg-toggle-option:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); }
.asg-toggle-option input[type="checkbox"] { display: none; }
.asg-toggle-slider {
    width: 40px; height: 22px; background: rgba(255,255,255,0.1); border-radius: 11px;
    position: relative; transition: 0.3s; flex-shrink: 0;
}
.asg-toggle-slider::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 16px; height: 16px; background: #555; border-radius: 50%; transition: 0.3s;
}
.asg-toggle-option input:checked + .asg-toggle-slider { background: #00d4aa; }
.asg-toggle-option input:checked + .asg-toggle-slider::after { left: 21px; background: #fff; }
.asg-toggle-label { color: #c0d0e0; font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.asg-toggle-label i { color: #6b7b95; font-size: 14px; }

.asg-modal-submit-btn {
    width: 100%; padding: 16px; border: none; border-radius: 14px;
    background: linear-gradient(135deg, #00d4aa, #0099ff); color: #fff;
    font-size: 14px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
    cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 6px 20px rgba(0,212,170,0.25); margin-top: 8px;
}
.asg-modal-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,212,170,0.35); filter: brightness(1.05); }
.asg-modal-submit-btn:active { transform: translateY(0) scale(0.98); }
.asg-modal-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }


/* ==========================================================================
   ASG FRONTEND LAYOUT REFINEMENT
   Objective: stronger spacing system, cleaner configurator rhythm, better responsiveness
   ========================================================================== */
#asg-configuratore-wrapper {
    --asg-space-2xs: 8px;
    --asg-space-xs: 12px;
    --asg-space-sm: 16px;
    --asg-space-md: 20px;
    --asg-space-lg: 24px;
    --asg-space-xl: 32px;
    --asg-space-2xl: 40px;
    --asg-panel-pad: clamp(20px, 2vw, 36px);
    --asg-radius-lg: 20px;
    --asg-radius-xl: 24px;
    --asg-border-soft: 1px solid rgba(255,255,255,0.06);
}

.asg-plugin-container {
    padding: clamp(20px, 3vw, 40px) clamp(14px, 2vw, 24px);
}

.asg-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(400px, 580px);
    gap: clamp(20px, 2vw, 34px);
    align-items: stretch;
}

.asg-viewer-col,
.asg-controls-col {
    min-width: 0;
}

.asg-viewer-col {
    min-height: clamp(620px, 78vh, 860px);
    border-radius: var(--asg-radius-xl);
}

.asg-viewer-overlay {
    padding: 0;
}

.asg-viewer-top-info {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    max-width: min(100%, 260px);
}

.asg-drag-hint {
    color: rgba(255,255,255,0.72);
    font-size: 12px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.asg-viewer-controls {
    flex-wrap: wrap;
    width: fit-content;
    max-width: min(100%, 560px);
    row-gap: var(--asg-space-2xs);
    padding: 8px 10px;
}

.asg-controls-col {
    border-radius: var(--asg-radius-lg);
    min-height: clamp(620px, 78vh, 860px);
}

.asg-step-view.active-step {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 100%;
}

.asg-controls-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: clamp(22px, 2vw, 32px) var(--asg-panel-pad) clamp(14px, 1.2vw, 20px);
}

.asg-controls-header h2 {
    max-width: 28rem;
    margin: 0;
}

.asg-controls-header p {
    max-width: 34rem;
    line-height: 1.55;
}

.btn-back-models {
    position: static;
    order: -1;
    margin: 0 0 2px;
}

.asg-controls-body {
    padding: 0 var(--asg-panel-pad) var(--asg-space-lg);
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    overscroll-behavior: contain;
}

.control-group {
    padding: var(--asg-space-lg) 0;
}

.control-group h3 {
    margin-bottom: var(--asg-space-md);
}

.form-row {
    align-items: stretch;
}

.asg-form-row-lg {
    gap: var(--asg-space-lg);
}

.asg-form-col-full {
    width: 100%;
    min-width: 0;
}

#input-sporgenza,
#input-larghezza {
    min-width: 0;
}

.asg-stepper-container {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: var(--asg-space-xs);
    min-width: 0;
    padding: 8px;
}

.stepper-value {
    min-width: 0;
    padding: 0 10px;
}

.asg-swatch-wrapper {
    gap: var(--asg-space-xs);
}

.asg-swatch-group {
    gap: 12px;
}

.selected-color-label {
    line-height: 1.45;
}

#dynamic-optionals-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

#step-2-view .asg-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#step-2-view .asg-field-group label {
    margin-bottom: 0;
}

.asg-checkbox-label,
#step-2-view .asg-field-group {
    min-height: 56px;
}

.asg-checkbox-label {
    margin-bottom: 0;
}

.asg-empty-options-message {
    grid-column: 1 / -1;
    margin: 0;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: var(--asg-border-soft);
    color: #8ba0b8;
    font-size: 13px;
    font-style: italic;
}

.asg-hidden-radios {
    display: none;
}

.asg-controls-footer {
    padding: var(--asg-space-md) var(--asg-panel-pad) var(--asg-space-lg);
    background: linear-gradient(180deg, rgba(6,10,18,0.2) 0%, rgba(6,10,18,0.92) 22%, rgba(6,10,18,0.98) 100%);
    border-top: var(--asg-border-soft);
    box-shadow: 0 -18px 38px rgba(0,0,0,0.18);
}

.price-box {
    margin-bottom: var(--asg-space-md);
}

.price-value {
    font-size: clamp(32px, 4vw, 40px);
}

.btn,
.asg-modal-submit-btn {
    min-height: 52px;
}

.disclaimer {
    margin-top: var(--asg-space-sm);
    line-height: 1.55;
    color: #617086;
}

.asg-lead-cta {
    margin-top: 15px;
}

.asg-color-picker-panel[hidden] {
    display: none;
}

.asg-color-picker-panel {
    margin-top: 14px;
}

.asg-modal-content.asg-modal-wide {
    max-height: min(92vh, 920px);
}

.asg-modal-left,
.asg-modal-right {
    min-width: 0;
}

.asg-modal-right {
    overflow-y: auto;
}

@media (max-width: 1320px) {
    .asg-grid {
        grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
    }
}

@media (max-width: 1100px) {
    .asg-grid {
        grid-template-columns: 1fr;
    }

    .asg-viewer-col,
    .asg-controls-col {
        min-height: auto;
    }

    .asg-viewer-col {
        min-height: clamp(360px, 48vh, 560px);
    }

    #dynamic-optionals-wrapper {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .asg-controls-header,
    .asg-controls-body,
    .asg-controls-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .asg-controls-header {
        padding-top: 20px;
    }

    .asg-controls-header h2 {
        font-size: 22px;
    }

    .asg-form-row-lg,
    .form-row,
    .asg-modal-right .asg-field-row-2 {
        flex-direction: column;
        gap: 12px;
    }

    #dynamic-optionals-wrapper {
        grid-template-columns: 1fr;
    }

    .asg-viewer-overlay {
        top: 14px;
        right: 14px;
        bottom: 14px;
        left: 14px;
    }

    .asg-viewer-controls {
        align-self: stretch;
        justify-content: center;
    }

    .btn-back-models {
        width: 100%;
        justify-content: center;
    }

    .asg-modal-content.asg-modal-wide {
        width: calc(100% - 20px);
        display: grid;
        grid-template-columns: 1fr;
        max-height: 94vh;
    }

    .asg-modal-left {
        flex: none;
        padding: 26px 22px 18px;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        gap: 16px;
    }

    .asg-modal-left h3 {
        font-size: 24px;
    }

    .asg-modal-right {
        padding: 24px 22px 22px;
    }
}

@media (max-width: 560px) {
    .asg-plugin-container {
        padding-inline: 10px;
    }

    .asg-viewer-col {
        border-radius: 18px;
        min-height: 320px;
    }

    .asg-controls-col {
        border-radius: 18px;
    }

    .asg-viewer-controls .btn-sm {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
        justify-content: center;
    }

    .asg-stepper-container {
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        gap: 10px;
    }

    .price-label {
        letter-spacing: 1.4px;
    }

    .price-value {
        font-size: 30px;
    }
}

@media (max-height: 900px) and (min-width: 1101px) {
    .asg-viewer-col,
    .asg-controls-col {
        min-height: 72vh;
    }
}


/* ==========================================================================
   ASG THEME-INTEGRATION HOTFIX
   Objective: stop theme bleed, fix header collisions from real site screenshots,
   and stabilize the mobile control bar.
   ========================================================================== */
#asg-configuratore-wrapper .asg-controls-header,
#asg-configuratore-wrapper .asg-controls-heading {
    min-width: 0;
}

#asg-configuratore-wrapper .asg-controls-header {
    gap: 12px;
}

#asg-configuratore-wrapper .asg-controls-header-config {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px 16px;
}

#asg-configuratore-wrapper .asg-controls-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

#asg-configuratore-wrapper .asg-controls-header h2,
#asg-configuratore-wrapper .asg-controls-header h2 .gradient-text {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: clamp(18px, 2.4vw, 34px);
    line-height: 0.96;
    letter-spacing: -0.055em;
    font-weight: 900;
    text-transform: none;
    margin: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

#asg-configuratore-wrapper .asg-controls-header p {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    letter-spacing: -0.01em;
    margin: 0;
}

#asg-configuratore-wrapper .btn,
#asg-configuratore-wrapper .btn-sm,
#asg-configuratore-wrapper .btn-back-models,
#asg-configuratore-wrapper .price-label,
#asg-configuratore-wrapper .price-value,
#asg-configuratore-wrapper .control-group h3,
#asg-configuratore-wrapper label,
#asg-configuratore-wrapper .selected-color-label,
#asg-configuratore-wrapper .asg-model-card .mc-info h4,
#asg-configuratore-wrapper .asg-model-card .mc-info p,
#asg-configuratore-wrapper .asg-drag-hint {
    font-family: 'Inter', system-ui, sans-serif;
}

#asg-configuratore-wrapper .btn-back-models {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1;
}

#asg-configuratore-wrapper .asg-viewer-controls {
    width: min(100%, 440px);
}

#asg-configuratore-wrapper .asg-viewer-controls .btn-sm {
    min-height: 46px;
    font-size: 12px;
    letter-spacing: 0.04em;
}

#asg-configuratore-wrapper .asg-controls-footer {
    padding-top: 18px;
}

#asg-configuratore-wrapper .disclaimer {
    max-width: 44ch;
    margin-inline: auto;
}

@media (max-width: 767px) {
    #asg-configuratore-wrapper .asg-controls-header-config {
        grid-template-columns: 1fr;
    }

    #asg-configuratore-wrapper .btn-back-models {
        order: 2;
        width: fit-content;
        max-width: 100%;
    }

    #asg-configuratore-wrapper .asg-controls-header h2,
    #asg-configuratore-wrapper .asg-controls-header h2 .gradient-text {
        font-size: clamp(16px, 7vw, 26px);
        line-height: 0.98;
    }

    #asg-configuratore-wrapper .asg-controls-header p {
        font-size: 13px;
    }

    #asg-configuratore-wrapper .control-group {
        padding: 18px 0;
    }

    #asg-configuratore-wrapper .control-group h3 {
        font-size: 12px;
        letter-spacing: 0.08em;
        margin-bottom: 14px;
    }

    #asg-configuratore-wrapper .asg-viewer-overlay {
        justify-content: space-between;
    }

    #asg-configuratore-wrapper .asg-viewer-controls {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        max-width: none;
        padding: 10px;
        border-radius: 22px;
        gap: 8px;
    }

    #asg-configuratore-wrapper .asg-viewer-controls .btn-sm {
        width: 100%;
        min-width: 0;
        padding: 11px 10px;
        border-radius: 16px;
        font-size: 11px;
    }

    #asg-configuratore-wrapper .price-box {
        margin-bottom: 14px;
    }

    #asg-configuratore-wrapper .price-value {
        font-size: 28px;
    }
}

@media (max-width: 430px) {
    #asg-configuratore-wrapper .asg-plugin-container {
        padding-inline: 8px;
    }

    #asg-configuratore-wrapper .asg-viewer-col {
        min-height: 350px;
    }

    #asg-configuratore-wrapper .asg-viewer-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #asg-configuratore-wrapper .asg-viewer-controls .btn-sm:last-child {
        grid-column: 1 / -1;
    }

    #asg-configuratore-wrapper .btn-back-models {
        width: 100%;
    }

    #asg-configuratore-wrapper .asg-controls-header,
    #asg-configuratore-wrapper .asg-controls-body,
    #asg-configuratore-wrapper .asg-controls-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    #asg-configuratore-wrapper .selected-color-label {
        font-size: 12px;
    }

    #asg-configuratore-wrapper .asg-swatch {
        width: 42px;
        height: 42px;
    }
}

/* ==========================================================================
   ASG V3 VISUAL POLISH
   Objective: richer popup, cleaner configurator panel, no accessories block,
   and smoother mobile scrolling.
   ========================================================================== */
#asg-configuratore-wrapper #step-2-view .asg-controls-body {
    padding-top: 8px;
}

#asg-configuratore-wrapper #step-2-view .control-group {
    position: relative;
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid rgba(120, 149, 188, 0.14);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.015) 100%),
        linear-gradient(180deg, rgba(9,15,28,0.78) 0%, rgba(4,9,18,0.92) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.03),
        0 14px 34px rgba(0,0,0,0.18);
    border-bottom: 1px solid rgba(120, 149, 188, 0.14);
}

#asg-configuratore-wrapper #step-2-view .control-group::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(0,212,170,0) 0%, rgba(0,212,170,0.28) 22%, rgba(91,154,255,0.22) 78%, rgba(91,154,255,0) 100%);
}

#asg-configuratore-wrapper #step-2-view .control-group h3 {
    margin-bottom: 16px;
    font-size: 13px;
    letter-spacing: 0.08em;
}

#asg-configuratore-wrapper #step-2-view .form-row {
    margin-bottom: 0;
    gap: 14px;
}

#asg-configuratore-wrapper #step-2-view .form-col,
#asg-configuratore-wrapper #step-2-view .form-row-full {
    margin-bottom: 0;
    padding: 16px;
    border-radius: 18px;
    background: rgba(2, 8, 18, 0.44);
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

#asg-configuratore-wrapper #step-2-view .form-col label,
#asg-configuratore-wrapper #step-2-view .form-row-full > label {
    color: #7e90ab;
    margin-bottom: 10px;
}

#asg-configuratore-wrapper #step-2-view .asg-stepper-container {
    background: linear-gradient(180deg, rgba(0,0,0,0.58) 0%, rgba(0,0,0,0.42) 100%);
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.02),
        inset 0 8px 24px rgba(0,0,0,0.18),
        0 8px 18px rgba(0,0,0,0.12);
}

#asg-configuratore-wrapper #step-2-view .stepper-value {
    font-size: clamp(18px, 2vw, 21px);
    letter-spacing: -0.02em;
}

#asg-configuratore-wrapper #step-2-view .selected-color-label {
    font-size: 15px;
    font-weight: 700;
    color: #ecf4ff;
}

#asg-configuratore-wrapper #step-2-view .asg-swatch-wrapper {
    gap: 14px;
}

#asg-configuratore-wrapper #step-2-view .asg-swatch-group {
    gap: 12px;
}

#asg-configuratore-wrapper #step-2-view .asg-color-picker-panel {
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(0,212,170,0.08) 0%, rgba(0,153,255,0.06) 100%);
    border-color: rgba(91,154,255,0.18);
}

#asg-configuratore-wrapper #step-2-view .asg-controls-footer {
    padding-top: 20px;
}

#asg-configuratore-wrapper #step-2-view .price-box {
    padding: 16px 18px;
    margin-bottom: 16px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.015) 100%);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

#asg-configuratore-wrapper #step-2-view #btn-generate-pdf,
#asg-configuratore-wrapper #step-2-view #btn-request-quote {
    border-radius: 20px;
}

#asg-configuratore-wrapper #step-2-view #btn-request-quote {
    background: linear-gradient(180deg, rgba(11,18,31,0.92) 0%, rgba(7,12,24,0.98) 100%);
    border-color: rgba(255,255,255,0.08);
    color: #eef5ff;
}

#asg-configuratore-wrapper #step-2-view .disclaimer {
    max-width: 48ch;
    color: #74839a;
}

#asg-configuratore-wrapper .asg-modal-overlay {
    padding: 20px;
}

#asg-configuratore-wrapper .asg-modal-content.asg-modal-wide {
    width: min(1080px, 100%);
    border-radius: 30px;
    background:
        radial-gradient(circle at top left, rgba(0,212,170,0.08), transparent 28%),
        radial-gradient(circle at top right, rgba(91,154,255,0.08), transparent 26%),
        linear-gradient(180deg, #111826 0%, #0a101b 100%);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 38px 100px rgba(0,0,0,0.56),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

#asg-configuratore-wrapper .asg-modal-close-btn {
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255,255,255,0.07);
    color: #9aa9bc;
}

#asg-configuratore-wrapper .asg-modal-left {
    flex: 0 0 340px;
    padding: 38px 34px;
    gap: 18px;
    background: linear-gradient(180deg, rgba(0,212,170,0.10) 0%, rgba(0,67,92,0.16) 52%, rgba(6,11,20,0.94) 100%);
}

#asg-configuratore-wrapper .asg-modal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #dffcff;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
}

#asg-configuratore-wrapper .asg-modal-copy {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#asg-configuratore-wrapper .asg-modal-left h3 {
    font-size: clamp(30px, 3vw, 38px);
    line-height: 1.02;
    letter-spacing: -0.06em;
    margin: 0;
}

#asg-configuratore-wrapper .asg-modal-left p {
    color: #93a4b9;
    font-size: 15px;
    line-height: 1.75;
}

#asg-configuratore-wrapper .asg-modal-benefits {
    display: grid;
    gap: 10px;
}

#asg-configuratore-wrapper .asg-modal-benefit {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(4, 12, 22, 0.28);
    border: 1px solid rgba(255,255,255,0.06);
    color: #d5e2f0;
    font-size: 13px;
    line-height: 1.5;
}

#asg-configuratore-wrapper .asg-modal-benefit i {
    margin-top: 2px;
    color: #00d4aa;
}

#asg-configuratore-wrapper .asg-modal-left-footer {
    margin-top: 6px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: #7ef2d6;
    font-size: 12px;
}

#asg-configuratore-wrapper .asg-modal-left-footer small {
    display: block;
    margin-top: 6px;
    color: #8393a7;
    font-size: 11px;
    line-height: 1.6;
}

#asg-configuratore-wrapper .asg-modal-right {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 34px;
    overflow-y: auto;
}

#asg-configuratore-wrapper .asg-modal-form-shell,
#asg-configuratore-wrapper .asg-modal-option-card {
    padding: 22px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.018) 100%);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

#asg-configuratore-wrapper .asg-modal-section-title {
    margin-bottom: 10px;
}

#asg-configuratore-wrapper .asg-modal-section-copy {
    margin: 0 0 18px;
    color: #7e90a8;
    font-size: 13px;
    line-height: 1.65;
}

#asg-configuratore-wrapper .asg-modal-right .asg-field-row-2 {
    gap: 16px;
}

#asg-configuratore-wrapper .asg-modal-right .asg-field-group {
    margin-bottom: 16px;
}

#asg-configuratore-wrapper .asg-modal-right .asg-field-group:last-child {
    margin-bottom: 0;
}

#asg-configuratore-wrapper .asg-modal-input {
    min-height: 54px;
    padding: 15px 16px;
    border-radius: 14px;
    background: rgba(4,11,22,0.76);
    border: 1px solid rgba(140, 161, 190, 0.22);
    color: #eef5ff;
}

#asg-configuratore-wrapper .asg-modal-input::placeholder {
    color: #60738c;
}

#asg-configuratore-wrapper .asg-toggle-option {
    margin-bottom: 0;
    min-height: 58px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(4,11,22,0.58);
    border: 1px solid rgba(255,255,255,0.06);
}

#asg-configuratore-wrapper .asg-toggle-label {
    color: #eaf2fc;
    font-size: 14px;
}

#asg-configuratore-wrapper .asg-modal-submit-btn {
    min-height: 58px;
    margin-top: 0;
    border-radius: 18px;
    letter-spacing: 0.08em;
    box-shadow: 0 16px 38px rgba(0,153,255,0.20);
}

@media (max-width: 1100px) {
    #asg-configuratore-wrapper .asg-controls-col {
        overflow: visible;
    }

    #asg-configuratore-wrapper .asg-step-view.active-step {
        display: flex;
        min-height: auto;
        height: auto;
    }

    #asg-configuratore-wrapper .asg-controls-body {
        overflow: visible;
        max-height: none;
        overscroll-behavior: auto;
        -webkit-overflow-scrolling: touch;
    }

    #asg-configuratore-wrapper #asg-3d-canvas,
    #asg-configuratore-wrapper #asg-3d-canvas canvas {
        touch-action: pan-y pinch-zoom;
    }
}

@media (max-width: 767px) {
    #asg-configuratore-wrapper #step-2-view .control-group {
        padding: 16px;
        border-radius: 20px;
    }

    #asg-configuratore-wrapper #step-2-view .form-col,
    #asg-configuratore-wrapper #step-2-view .form-row-full {
        padding: 14px;
    }

    #asg-configuratore-wrapper .asg-modal-overlay {
        align-items: flex-start;
        overflow-y: auto;
        padding: 12px;
    }

    #asg-configuratore-wrapper .asg-modal-content.asg-modal-wide {
        margin: 6px 0 20px;
        border-radius: 24px;
    }

    #asg-configuratore-wrapper .asg-modal-left {
        flex: none;
        padding: 24px 20px 18px;
    }

    #asg-configuratore-wrapper .asg-modal-left h3 {
        font-size: 28px;
    }

    #asg-configuratore-wrapper .asg-modal-benefit {
        padding: 10px 12px;
    }

    #asg-configuratore-wrapper .asg-modal-right {
        padding: 18px;
        gap: 14px;
    }

    #asg-configuratore-wrapper .asg-modal-form-shell,
    #asg-configuratore-wrapper .asg-modal-option-card {
        padding: 16px;
        border-radius: 18px;
    }

    #asg-configuratore-wrapper .asg-modal-input {
        min-height: 50px;
        padding: 13px 14px;
    }

    #asg-configuratore-wrapper .asg-modal-submit-btn {
        min-height: 54px;
    }
}

/* ==========================================================================
   ASG V4 REFINEMENT
   Objective: elevate model selection, fix header hierarchy, relax popup,
   reduce visual clutter, and improve mobile scroll behavior.
   ========================================================================== */
#asg-configuratore-wrapper {
    --asg-panel-surface: linear-gradient(180deg, rgba(10,16,28,0.96) 0%, rgba(6,11,20,0.98) 100%);
    --asg-soft-stroke: 1px solid rgba(255,255,255,0.07);
    --asg-soft-shadow: 0 24px 60px rgba(0,0,0,0.32);
}

#asg-configuratore-wrapper .asg-grid {
    align-items: stretch;
}

#asg-configuratore-wrapper .asg-viewer-col,
#asg-configuratore-wrapper .asg-controls-col {
    position: relative;
}

#asg-configuratore-wrapper .asg-viewer-col {
    aspect-ratio: 1.34 / 1;
    min-height: clamp(640px, 76vh, 860px);
}

#asg-configuratore-wrapper .asg-controls-col {
    background: var(--asg-panel-surface);
}

#asg-configuratore-wrapper .asg-panel-kicker,
#asg-configuratore-wrapper .asg-viewer-teaser-kicker,
#asg-configuratore-wrapper .asg-modal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(91,154,255,0.16);
    background: rgba(13, 20, 34, 0.66);
    color: #a6bbd4;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

#asg-configuratore-wrapper .asg-controls-header-models {
    padding-bottom: 22px;
}

#asg-configuratore-wrapper .asg-state-models .asg-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(420px, 580px);
}

#asg-configuratore-wrapper .asg-state-models .asg-viewer-col {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 36px 80px rgba(0,0,0,0.36);
}

#asg-configuratore-wrapper .asg-state-models #asg-3d-canvas {
    filter: saturate(0.86) brightness(0.52) blur(0.2px);
    transform: scale(1.02);
    transform-origin: center;
}

#asg-configuratore-wrapper .asg-state-models .asg-viewer-top-info,
#asg-configuratore-wrapper .asg-state-models .asg-viewer-controls,
#asg-configuratore-wrapper .asg-state-models .asg-watermark {
    opacity: 0;
}

#asg-configuratore-wrapper .asg-viewer-teaser {
    position: absolute;
    inset: 28px;
    z-index: 14;
    display: none;
    align-items: flex-end;
    pointer-events: none;
}

#asg-configuratore-wrapper .asg-state-models .asg-viewer-teaser {
    display: flex;
}

#asg-configuratore-wrapper .asg-viewer-teaser-card {
    max-width: 520px;
    padding: 28px 28px 30px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        radial-gradient(circle at top right, rgba(0,212,170,0.16), transparent 38%),
        linear-gradient(180deg, rgba(10,16,28,0.84) 0%, rgba(7,11,20,0.94) 100%);
    box-shadow: 0 24px 60px rgba(0,0,0,0.34);
    backdrop-filter: blur(14px);
}

#asg-configuratore-wrapper .asg-viewer-teaser-card h3 {
    margin: 14px 0 12px;
    font-size: clamp(30px, 3.2vw, 50px);
    line-height: 0.96;
    letter-spacing: -0.06em;
    color: #fff;
}

#asg-configuratore-wrapper .asg-viewer-teaser-card p {
    margin: 0;
    max-width: 38ch;
    color: #99abc2;
    font-size: 15px;
    line-height: 1.65;
}

#asg-configuratore-wrapper .asg-viewer-teaser-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

#asg-configuratore-wrapper .asg-viewer-teaser-points span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.07);
    color: #e8f2ff;
    font-size: 13px;
    font-weight: 600;
}

#asg-configuratore-wrapper .asg-models-grid {
    display: grid;
    gap: 16px;
}

#asg-configuratore-wrapper .asg-model-card {
    position: relative;
    display: grid;
    gap: 16px;
    width: 100%;
    padding: 22px 22px 20px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.06);
    background:
        radial-gradient(circle at top right, rgba(91,154,255,0.08), transparent 40%),
        linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.015) 100%);
    text-align: left;
    cursor: pointer;
    transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease, background .28s ease;
}

#asg-configuratore-wrapper .asg-model-card:hover {
    transform: translateY(-5px);
    border-color: rgba(91,154,255,0.28);
    box-shadow: 0 22px 42px rgba(0,0,0,0.28), 0 0 0 1px rgba(91,154,255,0.08);
}

#asg-configuratore-wrapper .asg-model-card .mc-index {
    position: absolute;
    top: 18px;
    right: 18px;
    color: rgba(255,255,255,0.18);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

#asg-configuratore-wrapper .asg-model-card .mc-pill {
    width: fit-content;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(0,212,170,0.09);
    border: 1px solid rgba(0,212,170,0.12);
    color: #77f3da;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

#asg-configuratore-wrapper .asg-model-card .mc-main {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

#asg-configuratore-wrapper .asg-model-card .mc-icon {
    width: 56px;
    height: 56px;
    margin: 0;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(0,212,170,0.18) 0%, rgba(0,153,255,0.16) 100%);
    color: #7ceee0;
    font-size: 23px;
}

#asg-configuratore-wrapper .asg-model-card .mc-info h4 {
    margin: 2px 0 6px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

#asg-configuratore-wrapper .asg-model-card .mc-info p {
    margin: 0;
    color: #8ea2bc;
    line-height: 1.58;
}

#asg-configuratore-wrapper .asg-model-card .mc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#asg-configuratore-wrapper .asg-model-card .mc-meta span,
#asg-configuratore-wrapper .asg-model-card .mc-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#asg-configuratore-wrapper .asg-model-card .mc-meta span {
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.05);
    color: #dce7f7;
    font-size: 12px;
    font-weight: 600;
}

#asg-configuratore-wrapper .asg-model-card .mc-cta {
    justify-content: space-between;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

#asg-configuratore-wrapper .asg-state-configurator .asg-viewer-teaser {
    display: none;
}

#asg-configuratore-wrapper .asg-state-configurator .asg-viewer-top-info,
#asg-configuratore-wrapper .asg-state-configurator .asg-viewer-controls,
#asg-configuratore-wrapper .asg-state-configurator .asg-watermark {
    opacity: 1;
}

#asg-configuratore-wrapper .asg-state-configurator #asg-3d-canvas {
    filter: none;
    transform: none;
}

#asg-configuratore-wrapper .asg-controls-header-config {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    padding-bottom: 18px;
}

#asg-configuratore-wrapper .asg-controls-header-config .asg-controls-heading {
    gap: 8px;
}

#asg-configuratore-wrapper .btn-back-models {
    align-self: start;
    min-width: 168px;
    min-height: 42px;
    padding: 12px 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.025) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    color: #b7c8da;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

#asg-configuratore-wrapper .btn-back-models:hover {
    color: #fff;
    border-color: rgba(91,154,255,0.22);
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

#asg-configuratore-wrapper #step-2-view .control-group {
    margin-bottom: 18px;
    border-radius: 26px;
}

#asg-configuratore-wrapper #step-2-view .control-group h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

#asg-configuratore-wrapper #step-2-view .form-col,
#asg-configuratore-wrapper #step-2-view .form-row-full {
    border-radius: 20px;
}

#asg-configuratore-wrapper #step-2-view .asg-stepper-container {
    min-height: 62px;
    border-radius: 18px;
}

#asg-configuratore-wrapper .asg-controls-footer {
    padding-top: 22px;
}

#asg-configuratore-wrapper .price-box {
    padding: 18px 20px;
    border-radius: 24px;
}

#asg-configuratore-wrapper .price-value {
    letter-spacing: -0.06em;
}

#asg-configuratore-wrapper .asg-modal-overlay {
    padding: 26px;
}

#asg-configuratore-wrapper .asg-modal-content.asg-modal-wide {
    width: min(1120px, 100%);
    max-height: min(92vh, 920px);
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        radial-gradient(circle at top right, rgba(0,212,170,0.12), transparent 24%),
        linear-gradient(180deg, rgba(12,18,31,0.98) 0%, rgba(7,12,22,0.99) 100%);
}

#asg-configuratore-wrapper .asg-modal-left {
    flex: 0 0 330px;
    gap: 22px;
    padding: 34px 30px;
    background:
        radial-gradient(circle at top left, rgba(0,212,170,0.16), transparent 34%),
        linear-gradient(180deg, rgba(11,19,33,0.84) 0%, rgba(8,14,24,0.98) 100%);
}

#asg-configuratore-wrapper .asg-modal-icon {
    width: 62px;
    height: 62px;
    border-radius: 20px;
}

#asg-configuratore-wrapper .asg-modal-copy h3 {
    margin-bottom: 10px;
    font-size: clamp(30px, 3vw, 40px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

#asg-configuratore-wrapper .asg-modal-copy p {
    color: #8ca0bb;
    font-size: 15px;
    line-height: 1.7;
}

#asg-configuratore-wrapper .asg-modal-stats {
    display: grid;
    gap: 12px;
}

#asg-configuratore-wrapper .asg-modal-stat-card,
#asg-configuratore-wrapper .asg-modal-card {
    border: var(--asg-soft-stroke);
    border-radius: 22px;
    background: rgba(255,255,255,0.035);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

#asg-configuratore-wrapper .asg-modal-stat-card {
    padding: 14px 14px 15px;
}

#asg-configuratore-wrapper .asg-modal-stat-card strong {
    display: block;
    color: #fff;
    font-size: 15px;
    letter-spacing: -0.02em;
}

#asg-configuratore-wrapper .asg-modal-stat-label {
    display: block;
    margin-bottom: 6px;
    color: #86a1c0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

#asg-configuratore-wrapper .asg-modal-left-footer {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(0,212,170,0.08);
    border: 1px solid rgba(0,212,170,0.12);
    color: #78f1da;
}

#asg-configuratore-wrapper .asg-modal-right {
    padding: 34px 34px 30px;
    overflow-y: auto;
}

#asg-configuratore-wrapper .asg-modal-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

#asg-configuratore-wrapper .asg-modal-card {
    padding: 18px;
    animation: asgModalCardIn .45s cubic-bezier(.2,.8,.2,1) both;
}

#asg-configuratore-wrapper .asg-modal-card:nth-child(2) { animation-delay: .05s; }
#asg-configuratore-wrapper .asg-modal-card:nth-child(3) { animation-delay: .1s; }

#asg-configuratore-wrapper .asg-modal-card-option {
    grid-column: 1 / -1;
}

#asg-configuratore-wrapper .asg-modal-section-title {
    margin-bottom: 14px;
}

#asg-configuratore-wrapper .asg-modal-card .asg-field-group + .asg-field-group {
    margin-top: 14px;
}

#asg-configuratore-wrapper .asg-modal-input {
    min-height: 54px;
    border-radius: 16px;
    background: rgba(4,10,18,0.62);
}

#asg-configuratore-wrapper .asg-toggle-option {
    min-height: 62px;
    border-radius: 18px;
}

#asg-configuratore-wrapper .asg-modal-submit-btn {
    min-height: 60px;
    border-radius: 20px;
    box-shadow: 0 20px 44px rgba(0,153,255,0.22);
}

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

@media (max-width: 1250px) {
    #asg-configuratore-wrapper .asg-state-models .asg-grid {
        grid-template-columns: minmax(0, 1fr) minmax(380px, 520px);
    }

    #asg-configuratore-wrapper .asg-viewer-teaser-card h3 {
        font-size: clamp(28px, 3vw, 42px);
    }
}

@media (max-width: 1100px) {
    #asg-configuratore-wrapper .asg-viewer-col {
        aspect-ratio: auto;
        min-height: clamp(360px, 46vh, 560px);
    }

    #asg-configuratore-wrapper .asg-state-models .asg-grid {
        grid-template-columns: 1fr;
    }

    #asg-configuratore-wrapper .asg-state-models .asg-viewer-teaser {
        inset: 18px;
    }

    #asg-configuratore-wrapper .asg-state-models .asg-viewer-teaser-card {
        max-width: 100%;
    }

    #asg-configuratore-wrapper .asg-controls-col,
    #asg-configuratore-wrapper .asg-step-view,
    #asg-configuratore-wrapper .asg-step-view.active-step,
    #asg-configuratore-wrapper .asg-controls-body {
        overflow: visible;
        max-height: none;
        height: auto;
    }
}

@media (max-width: 767px) {
    #asg-configuratore-wrapper .asg-controls-header-config {
        grid-template-columns: 1fr;
    }

    #asg-configuratore-wrapper .btn-back-models {
        min-width: 0;
        width: fit-content;
    }

    #asg-configuratore-wrapper .asg-viewer-teaser-card {
        padding: 22px 20px 22px;
        border-radius: 24px;
    }

    #asg-configuratore-wrapper .asg-viewer-teaser-card h3 {
        font-size: clamp(24px, 9vw, 34px);
    }

    #asg-configuratore-wrapper .asg-model-card {
        padding: 18px 18px 17px;
        border-radius: 22px;
    }

    #asg-configuratore-wrapper .asg-model-card .mc-main {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 14px;
    }

    #asg-configuratore-wrapper .asg-model-card .mc-icon {
        width: 48px;
        height: 48px;
        border-radius: 16px;
        font-size: 19px;
    }

    #asg-configuratore-wrapper .asg-model-card .mc-info h4 {
        font-size: 20px;
    }

    #asg-configuratore-wrapper .asg-modal-overlay {
        padding: 12px;
    }

    #asg-configuratore-wrapper .asg-modal-content.asg-modal-wide {
        display: grid;
        grid-template-columns: 1fr;
        max-height: none;
    }

    #asg-configuratore-wrapper .asg-modal-left,
    #asg-configuratore-wrapper .asg-modal-right {
        padding: 22px 18px;
    }

    #asg-configuratore-wrapper .asg-modal-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    #asg-configuratore-wrapper .asg-controls-header,
    #asg-configuratore-wrapper .asg-controls-body,
    #asg-configuratore-wrapper .asg-controls-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    #asg-configuratore-wrapper .asg-viewer-col {
        min-height: 330px;
    }

    #asg-configuratore-wrapper .asg-viewer-overlay {
        inset: 12px;
    }

    #asg-configuratore-wrapper .asg-viewer-controls {
        padding: 10px;
        gap: 8px;
    }

    #asg-configuratore-wrapper .asg-modal-content.asg-modal-wide {
        border-radius: 24px;
    }
}


/* ==========================================================================
   ASG V6 FRONTEND FIXES
   Focus: viewer layout, CAD floor, mobile safe space, non-overlapping columns.
   ========================================================================== */
#asg-configuratore-wrapper .asg-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 580px);
    gap: 24px;
    align-items: stretch;
}

#asg-configuratore-wrapper .asg-viewer-col,
#asg-configuratore-wrapper .asg-controls-col {
    min-width: 0;
}

#asg-configuratore-wrapper .asg-viewer-col {
    width: 100%;
    isolation: isolate;
}

#asg-configuratore-wrapper .asg-controls-col {
    z-index: 2;
}

#asg-configuratore-wrapper #asg-3d-canvas {
    border-radius: inherit;
    overflow: hidden;
}

#asg-configuratore-wrapper .asg-viewer-overlay {
    z-index: 12;
}

#asg-configuratore-wrapper .asg-state-configurator .asg-controls-header-config {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

#asg-configuratore-wrapper .asg-state-configurator .btn-back-models {
    justify-self: start;
}

@media (max-width: 1180px) {
    #asg-configuratore-wrapper .asg-grid {
        grid-template-columns: 1fr;
    }

    #asg-configuratore-wrapper .asg-viewer-col,
    #asg-configuratore-wrapper .asg-controls-col {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 767px) {
    #asg-configuratore-wrapper .asg-viewer-col {
        min-height: clamp(320px, 58vh, 440px);
    }

    #asg-configuratore-wrapper .asg-viewer-overlay {
        inset: 12px;
    }

    #asg-configuratore-wrapper .asg-viewer-top-info {
        max-width: calc(100% - 84px);
    }

    #asg-configuratore-wrapper .asg-viewer-controls {
        width: min(100%, 320px);
        padding: 10px;
    }
}


/* ==========================================================================
   ASG V7 FRONTEND POLISH
   Focus: stable viewer box, centered mobile toolbar, safer gizmo placement.
   ========================================================================== */
#asg-configuratore-wrapper .asg-grid {
    gap: 28px;
    align-items: stretch;
}

#asg-configuratore-wrapper .asg-viewer-col,
#asg-configuratore-wrapper .asg-controls-col {
    position: relative;
    contain: layout paint;
}

#asg-configuratore-wrapper .asg-viewer-col {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 18px 48px rgba(0,0,0,.34);
}

#asg-configuratore-wrapper #asg-3d-canvas,
#asg-configuratore-wrapper #asg-3d-canvas canvas {
    max-width: 100%;
}

#asg-configuratore-wrapper .asg-viewer-top-info {
    z-index: 14;
}

#asg-configuratore-wrapper .asg-viewer-controls {
    margin-inline: auto;
}

@media (min-width: 1181px) {
    #asg-configuratore-wrapper .asg-grid {
        grid-template-columns: minmax(0, 1fr) minmax(460px, 560px);
    }
}

@media (max-width: 767px) {
    #asg-configuratore-wrapper .asg-viewer-overlay {
        align-items: stretch;
    }

    #asg-configuratore-wrapper .asg-viewer-controls {
        width: min(92%, 320px);
        justify-content: center;
        justify-items: center;
        align-self: center;
        margin-inline: auto;
    }

    #asg-configuratore-wrapper .asg-viewer-controls .btn-sm {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 430px) {
    #asg-configuratore-wrapper .asg-viewer-controls {
        width: min(92%, 308px);
    }
}


/* ==========================================================================
   ASG V9 STABLE ROLLBACK FIX
   Focus: restore stable viewer runtime, true centered toolbar, safer spacing.
   ========================================================================== */
#asg-configuratore-wrapper .asg-viewer-overlay {
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-items: start;
}

#asg-configuratore-wrapper .asg-viewer-controls {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 40px);
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 10px;
}

#asg-configuratore-wrapper .asg-viewer-controls .btn,
#asg-configuratore-wrapper .asg-viewer-controls .btn-sm {
    min-width: 126px;
    justify-content: center;
    text-align: center;
}

@media (max-width: 767px) {
    #asg-configuratore-wrapper .asg-viewer-overlay {
        inset: 12px;
    }

    #asg-configuratore-wrapper .asg-viewer-controls {
        position: absolute;
        left: 50%;
        right: auto;
        bottom: 12px;
        transform: translateX(-50%);
        width: min(320px, calc(100% - 20px));
        max-width: calc(100% - 20px);
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 10px;
    }

    #asg-configuratore-wrapper .asg-viewer-controls .btn,
    #asg-configuratore-wrapper .asg-viewer-controls .btn-sm {
        width: 100%;
        min-width: 0;
    }

    #asg-configuratore-wrapper .asg-viewer-controls .btn:last-child,
    #asg-configuratore-wrapper .asg-viewer-controls .btn-sm:last-child {
        grid-column: 1 / -1;
    }
}


