/* ============================================================
   Configurator sisteme supraveghere — mobile-first, self-contained
   (functioneaza identic in pagina dedicata si in drawer-ul embed)
   ============================================================ */

.ec-conf {
    --ec-red: #dc0c0c;
    --ec-red-dark: #b00909;
    --ec-ink: #1a1d23;
    --ec-ink-soft: #5a616e;
    --ec-bg: #f6f7f9;
    --ec-card: #ffffff;
    --ec-line: #e6e8ec;
    --ec-radius: 18px;
    --ec-shadow: 0 8px 28px rgba(16, 24, 40, .09);
    --ec-bar-h: 64px;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ec-ink);
    background: var(--ec-bg);
    position: relative;
}
.ec-conf *, .ec-conf *::before, .ec-conf *::after { box-sizing: border-box; }
.ec-conf img { max-width: 100%; height: auto; }
.ec-conf button { font: inherit; cursor: pointer; }

/* ---------- container slide-uri (scroll-snap vertical) ---------- */
.ec-conf__slides {
    height: calc(100vh - 0px);
    height: calc(100dvh - 0px);
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.ec-conf__slide {
    min-height: calc(100vh - 0px);
    min-height: calc(100dvh - 0px);
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 18px calc(var(--ec-bar-h) + 34px);
    position: relative;
}
.ec-conf__slide-inner {
    width: 100%;
    max-width: 660px;
    animation: ec-fade-up .55s ease both;
}
@keyframes ec-fade-up {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .ec-conf__slides { scroll-behavior: auto; }
    .ec-conf__slide-inner { animation: none; }
}

/* ---------- intro ---------- */
.ec-conf__slide--intro {
    background: radial-gradient(1100px 520px at 80% -10%, #2c3340 0%, #181b21 60%), #181b21;
    color: #fff;
    text-align: center;
}
.ec-conf__intro-badge {
    display: inline-block;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    padding: 7px 16px;
    border-radius: 99px;
    font-size: 13px;
    letter-spacing: .4px;
    margin-bottom: 22px;
}
.ec-conf__slide--intro h1 {
    font-size: clamp(26px, 6vw, 42px);
    line-height: 1.15;
    margin: 0 0 16px;
    font-weight: 800;
}
.ec-conf__slide--intro h1 span { color: #ff5a5a; }
.ec-conf__slide--intro p {
    color: #c9cdd6;
    font-size: 16px;
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto 28px;
}
.ec-conf__intro-hint { margin-top: 16px; font-size: 13px; color: #8e95a3; }

/* ---------- titluri pas ---------- */
.ec-conf__step-no {
    font-size: 13px;
    font-weight: 700;
    color: var(--ec-red);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.ec-conf__slide h2 {
    font-size: clamp(22px, 5vw, 30px);
    line-height: 1.2;
    margin: 0 0 8px;
    font-weight: 800;
}
.ec-conf__step-sub {
    color: var(--ec-ink-soft);
    font-size: 15px;
    line-height: 1.55;
    margin: 0 0 22px;
}

/* ---------- carduri optiuni ---------- */
.ec-conf__options { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 540px) { .ec-conf__options { grid-template-columns: 1fr 1fr; } }

.ec-conf__option {
    background: var(--ec-card);
    border: 2px solid var(--ec-line);
    border-radius: var(--ec-radius);
    padding: 16px;
    text-align: left;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
    position: relative;
    width: 100%;
}
.ec-conf__option:active { transform: scale(.98); }
@media (hover: hover) {
    .ec-conf__option:hover { border-color: #c9ced8; box-shadow: var(--ec-shadow); transform: translateY(-2px); }
}
.ec-conf__option.is-selected {
    border-color: var(--ec-red);
    box-shadow: 0 6px 22px rgba(220, 12, 12, .14);
}
.ec-conf__option.is-selected::after {
    content: "✓";
    position: absolute;
    top: 10px; right: 12px;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--ec-red);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.ec-conf__option-emoji { font-size: 30px; line-height: 1; flex: 0 0 auto; margin-top: 2px; }
.ec-conf__option-title { font-weight: 700; font-size: 16px; margin-bottom: 4px; padding-right: 26px; }
.ec-conf__option-desc { font-size: 13.5px; color: var(--ec-ink-soft); line-height: 1.45; }
.ec-conf__option-badge {
    display: inline-block;
    background: #e9f7ef;
    color: #1d8a4b;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 99px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ---------- pas cantitate ---------- */
.ec-conf__qty {
    background: var(--ec-card);
    border-radius: var(--ec-radius);
    box-shadow: var(--ec-shadow);
    padding: 26px 20px;
    text-align: center;
}
.ec-conf__qty-value { font-size: 56px; font-weight: 800; line-height: 1; }
.ec-conf__qty-value small { font-size: 16px; font-weight: 600; color: var(--ec-ink-soft); display: block; margin-top: 6px; }
.ec-conf__qty-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 20px 0 8px; }
.ec-conf__qty-btn {
    width: 52px; height: 52px;
    border-radius: 50%;
    border: 2px solid var(--ec-line);
    background: #fff;
    font-size: 26px;
    font-weight: 700;
    color: var(--ec-ink);
    transition: border-color .15s, background .15s;
}
.ec-conf__qty-btn:active { background: #f1f2f5; }
.ec-conf__qty-slider { width: 100%; margin: 16px 0 4px; accent-color: var(--ec-red); }
.ec-conf__qty-presets { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.ec-conf__qty-preset {
    border: 1.5px solid var(--ec-line);
    background: #fff;
    border-radius: 99px;
    padding: 7px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ec-ink-soft);
}
.ec-conf__qty-preset.is-selected { border-color: var(--ec-red); color: var(--ec-red); background: #fdf0f0; }

/* ---------- pas produse (camere) ---------- */
.ec-conf__products { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .ec-conf__products { grid-template-columns: repeat(3, 1fr); } }
.ec-conf__product {
    background: var(--ec-card);
    border: 2px solid var(--ec-line);
    border-radius: var(--ec-radius);
    padding: 12px;
    text-align: center;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
    position: relative;
    width: 100%;
}
@media (hover: hover) {
    .ec-conf__product:hover { box-shadow: var(--ec-shadow); transform: translateY(-2px); }
}
.ec-conf__product.is-selected { border-color: var(--ec-red); box-shadow: 0 6px 22px rgba(220, 12, 12, .14); }
.ec-conf__product.is-selected::after {
    content: "✓ Aleasă";
    position: absolute;
    top: 8px; left: 8px;
    background: var(--ec-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 99px;
}
.ec-conf__product img { height: 92px; object-fit: contain; margin: 4px auto 8px; display: block; }
.ec-conf__product-name {
    font-size: 12.5px;
    line-height: 1.35;
    color: var(--ec-ink);
    min-height: 3.7em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ec-conf__product-price { font-size: 16px; font-weight: 800; color: var(--ec-red); margin-top: 6px; }
.ec-conf__product-price small { font-size: 11px; color: var(--ec-ink-soft); font-weight: 500; display: block; }
.ec-conf__product-stock { font-size: 11px; margin-top: 4px; color: #1d8a4b; font-weight: 600; }
.ec-conf__product-stock.is-order { color: #b8860b; }
.ec-conf__products-empty, .ec-conf__products-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--ec-ink-soft);
    padding: 30px 10px;
    background: var(--ec-card);
    border-radius: var(--ec-radius);
}

/* ---------- sumar ---------- */
.ec-conf__summary { background: var(--ec-card); border-radius: var(--ec-radius); box-shadow: var(--ec-shadow); overflow: hidden; }
.ec-conf__summary-line {
    display: flex; gap: 12px; align-items: center;
    padding: 13px 16px;
    border-bottom: 1px solid var(--ec-line);
}
.ec-conf__summary-line img { width: 46px; height: 46px; object-fit: contain; flex: 0 0 auto; border-radius: 8px; background: #fafafa; }
.ec-conf__summary-info { flex: 1; min-width: 0; }
.ec-conf__summary-name { font-size: 13.5px; font-weight: 700; }
.ec-conf__summary-prod {
    font-size: 12px; color: var(--ec-ink-soft);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ec-conf__summary-prod a { color: inherit; text-decoration: underline; }
.ec-conf__summary-qty { font-size: 12px; color: var(--ec-ink-soft); white-space: nowrap; }
.ec-conf__summary-price { font-weight: 800; font-size: 14px; white-space: nowrap; }
.ec-conf__summary-line.is-optional { opacity: .65; }
.ec-conf__summary-line.is-optional.is-on { opacity: 1; }
.ec-conf__summary-opt-toggle { accent-color: var(--ec-red); width: 18px; height: 18px; flex: 0 0 auto; }
.ec-conf__summary-total {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 16px;
    background: #181b21; color: #fff;
}
.ec-conf__summary-total strong { font-size: 24px; }
.ec-conf__summary-total small { color: #aab0bc; font-size: 12px; }
.ec-conf__summary-disclaimer { font-size: 12px; color: var(--ec-ink-soft); padding: 12px 16px 0; line-height: 1.5; }
.ec-conf__summary-ctas { display: grid; gap: 10px; padding: 14px 16px 18px; }
@media (min-width: 540px) { .ec-conf__summary-ctas { grid-template-columns: 1fr 1fr; } }

/* ---------- butoane ---------- */
.ec-conf__btn {
    border: 0;
    border-radius: 14px;
    padding: 15px 26px;
    font-size: 16px;
    font-weight: 700;
    transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}
.ec-conf__btn:active { transform: scale(.98); }
.ec-conf__btn--primary { background: var(--ec-red); color: #fff; box-shadow: 0 8px 22px rgba(220, 12, 12, .3); }
.ec-conf__btn--primary:hover { background: var(--ec-red-dark); }
.ec-conf__btn--ghost { background: #fff; color: var(--ec-ink); border: 2px solid var(--ec-line); }
.ec-conf__step-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; gap: 10px; }
.ec-conf__skip {
    background: none; border: 0;
    color: var(--ec-ink-soft);
    font-size: 14px;
    text-decoration: underline;
    padding: 10px;
}
.ec-conf__next-btn { padding: 13px 30px; }

/* ---------- bara sticky estimare ---------- */
.ec-conf__estimate {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 9990;
    background: #fff;
    border-top: 1px solid var(--ec-line);
    box-shadow: 0 -8px 30px rgba(16, 24, 40, .12);
    padding-bottom: env(safe-area-inset-bottom, 0);
    animation: ec-slide-up .4s ease both;
}
@keyframes ec-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.ec-conf--embed .ec-conf__estimate { position: absolute; }
.ec-conf__estimate-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: 0;
    padding: 10px 16px;
    min-height: var(--ec-bar-h);
    text-align: left;
}
.ec-conf__estimate-label { flex: 1; min-width: 0; }
.ec-conf__estimate-title { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--ec-ink-soft); font-weight: 700; }
.ec-conf__estimate-sub { display: block; font-size: 12px; color: var(--ec-ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-conf__estimate-total { font-size: 22px; font-weight: 800; color: var(--ec-red); white-space: nowrap; }
.ec-conf__estimate-total.is-loading { opacity: .45; }
.ec-conf__estimate-chevron { color: var(--ec-ink-soft); transition: transform .2s; }
.ec-conf__estimate-toggle[aria-expanded="true"] .ec-conf__estimate-chevron { transform: rotate(180deg); }
.ec-conf__estimate-sheet {
    max-height: 46vh;
    overflow-y: auto;
    border-top: 1px solid var(--ec-line);
    padding: 6px 0;
}
.ec-conf__estimate-sheet .ec-conf__summary-line { padding: 9px 16px; }
.ec-conf__estimate-sheet .ec-conf__summary-line img { width: 36px; height: 36px; }

/* ---------- dots progres ---------- */
.ec-conf__dots {
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 9px;
    z-index: 9980;
}
.ec-conf--embed .ec-conf__dots { position: absolute; }
.ec-conf__dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #c6cad2;
    border: 0;
    padding: 0;
    transition: background .2s, transform .2s;
}
.ec-conf__dot.is-active { background: var(--ec-red); transform: scale(1.45); }
.ec-conf__dot.is-done { background: #8d939e; }
@media (max-width: 480px) { .ec-conf__dots { right: 5px; } }

/* ---------- modal fullscreen ---------- */
.ec-conf__modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(12, 14, 18, .62);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: ec-fade-in .22s ease both;
}
@keyframes ec-fade-in { from { opacity: 0; } to { opacity: 1; } }
.ec-conf__modal[hidden] { display: none; }
.ec-conf__modal-card {
    background: #fff;
    width: 100%;
    max-width: 720px;
    max-height: 94vh;
    max-height: 94dvh;
    border-radius: 22px 22px 0 0;
    overflow-y: auto;
    position: relative;
    animation: ec-slide-up .3s ease both;
}
@media (min-width: 720px) {
    .ec-conf__modal { align-items: center; padding: 24px; }
    .ec-conf__modal-card { border-radius: 22px; max-height: 88vh; }
}
.ec-conf__modal-close {
    position: sticky;
    top: 10px;
    margin-left: calc(100% - 54px);
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 0;
    background: #f1f2f5;
    font-size: 17px;
    z-index: 2;
}
.ec-conf__modal-body { padding: 0 20px 26px; }
.ec-conf__modal-body h3 { font-size: 20px; margin: 0 0 6px; line-height: 1.3; }
.ec-conf__modal-img { text-align: center; margin: 4px 0 14px; }
.ec-conf__modal-img img { max-height: 240px; object-fit: contain; }
.ec-conf__modal-price { font-size: 26px; font-weight: 800; color: var(--ec-red); }
.ec-conf__modal-price small { font-size: 13px; font-weight: 500; color: var(--ec-ink-soft); }
.ec-conf__modal-meta { font-size: 13px; color: var(--ec-ink-soft); margin: 4px 0 14px; }
.ec-conf__modal-specs { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 12px 0 18px; }
.ec-conf__modal-specs td { padding: 8px 6px; border-bottom: 1px solid var(--ec-line); vertical-align: top; }
.ec-conf__modal-specs td:first-child { color: var(--ec-ink-soft); width: 42%; }
.ec-conf__modal-ctas { display: grid; gap: 10px; }
@media (min-width: 540px) { .ec-conf__modal-ctas { grid-template-columns: 1fr 1fr; } }
.ec-conf__modal-loading { text-align: center; color: var(--ec-ink-soft); padding: 48px 0; }

/* ---------- formular oferta ---------- */
.ec-conf__modal-card--form { max-width: 480px; }
.ec-conf__modal-card--form h3 { margin-top: 4px; }
.ec-conf__form-hint { font-size: 13.5px; color: var(--ec-ink-soft); line-height: 1.5; }
#ec-conf-oferta-form label { display: block; font-size: 13px; font-weight: 700; margin: 12px 0 4px; }
#ec-conf-oferta-form input, #ec-conf-oferta-form textarea {
    width: 100%;
    border: 1.5px solid var(--ec-line);
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    font-weight: 400;
    margin-top: 5px;
}
#ec-conf-oferta-form input:focus, #ec-conf-oferta-form textarea:focus {
    outline: none;
    border-color: var(--ec-red);
    box-shadow: 0 0 0 3px rgba(220, 12, 12, .1);
}
#ec-conf-oferta-form button[type="submit"] { width: 100%; margin-top: 16px; }
.ec-conf__hp { position: absolute !important; left: -9999px !important; height: 1px; width: 1px; opacity: 0; }
.ec-conf__form-errors {
    background: #fdecec; color: #9b1c1c;
    border-radius: 10px; padding: 10px 14px;
    font-size: 13.5px; margin-top: 12px;
}
.ec-conf__form-success {
    background: #e9f7ef; color: #14532d;
    border-radius: 12px; padding: 18px;
    font-size: 15px; text-align: center; margin-top: 8px;
}

/* ---------- bara embed ---------- */
.ec-conf--embed { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.ec-conf--embed .ec-conf__slides { flex: 1; height: auto; }
.ec-conf__embed-bar {
    display: flex; justify-content: space-between; align-items: center;
    background: #181b21; color: #fff;
    padding: 10px 14px;
    font-size: 13px; font-weight: 600;
}
.ec-conf__embed-bar a { color: #ff8a8a; text-decoration: none; font-weight: 700; }
body.configurator-embed { margin: 0; background: var(--ec-bg, #f6f7f9); }

/* ============================================================
   Launcher flotant + drawer desktop (incluse global pe site)
   ============================================================ */
.ec-conf-launcher {
    position: fixed;
    right: 18px; bottom: 18px;
    z-index: 99990;
    display: none;
    align-items: center;
    gap: 10px;
    background: #181b21;
    color: #fff;
    border: 0;
    border-radius: 99px;
    padding: 13px 22px 13px 16px;
    font-size: 14.5px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 10px 30px rgba(16, 24, 40, .35);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}
.ec-conf-launcher:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(16, 24, 40, .42); }
.ec-conf-launcher .ec-conf-launcher__icon { font-size: 19px; }
@media (min-width: 992px) { .ec-conf-launcher { display: inline-flex; } }

.ec-conf-drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 440px;
    max-width: 96vw;
    z-index: 99995;
    background: #f6f7f9;
    box-shadow: -18px 0 50px rgba(16, 24, 40, .3);
    transform: translateX(105%);
    transition: transform .32s cubic-bezier(.32, .72, .29, 1);
    display: flex;
    flex-direction: column;
}
.ec-conf-drawer.is-open { transform: translateX(0); }
.ec-conf-drawer__close {
    position: absolute;
    top: 9px; right: 12px;
    z-index: 3;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
}
.ec-conf-drawer__frame { flex: 1; border: 0; width: 100%; }
.ec-conf-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 99994;
    background: rgba(12, 14, 18, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}
.ec-conf-drawer-overlay.is-open { opacity: 1; pointer-events: auto; }
