/* ============================================================
   Service booking wizard — Peugeot, Citroën, Opel, DS, Fiat,
   Alfa Romeo, Jeep, Leapmotor.
   Self-contained stylesheet (no bootstrap, no style_new.css).

   ЦВЕТОВЕТЕ ПО МАРКА стоят в config/brands.php и се редактират от
   администрацията (таб „Марки"); wizard.php ги вгражда в <style> на
   страницата. Блоковете [data-brand="..."] по-долу са РЕЗЕРВА — важат,
   когато страницата се отваря без вградените променливи (например при
   статичен преглед на формата). Затова стойностите тук трябва да са
   същите като стойностите по подразбиране в config/brands.php.
   ============================================================ */

:root {
    --brand:        #17346F;
    --brand-700:    #12295A;
    --brand-600:    #24509E;
    --brand-50:     #EEF3FC;
    --accent:       #00A3E0;

    --ink:          #101828;
    --ink-2:        #344054;
    --muted:        #667085;
    --line:         #E4E7EC;
    --line-2:       #D0D5DD;
    --bg:           #F5F7FA;
    --card:         #FFFFFF;

    --ok:           #067647;
    --ok-bg:        #ECFDF3;
    --err:          #B42318;
    --err-bg:       #FEF3F2;
    --warn:         #B54708;
    --warn-bg:      #FFFAEB;

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(16,24,40,.05);
    --shadow-md: 0 4px 16px rgba(16,24,40,.08);
    --shadow-lg: 0 12px 32px rgba(16,24,40,.10);
    --ring: 0 0 0 4px rgba(36,80,158,.14);
}

/* --- Теми по марка (резерва; виж коментара в началото) --- */

/* DS Automobiles */
[data-brand="ds"] {
    --brand:     #7A0A2E;
    --brand-700: #5C0722;
    --brand-600: #AD0040;
    --brand-50:  #FCEFF3;
    --accent:    #AD9D91;
    --ring: 0 0 0 4px rgba(173,0,64,.14);
}

/* Citroën */
[data-brand="citroen"] {
    --brand:     #DA291C;
    --brand-700: #AE2116;
    --brand-600: #E8402F;
    --brand-50:  #FDEDEB;
    --accent:    #DA291C;
    --ring: 0 0 0 4px rgba(232,64,47,.16);
}

/* Opel — основният цвят е черен, жълтото е акцент:
   жълто върху бяло не е четимо за текст и бутони. */
[data-brand="opel"] {
    --brand:     #1A1A1A;
    --brand-700: #000000;
    --brand-600: #3D3D3D;
    --brand-50:  #FFF9DB;
    --accent:    #F7FF14;
    --ring: 0 0 0 4px rgba(26,26,26,.14);
}

/* Fiat */
[data-brand="fiat"] {
    --brand:     #A6192E;
    --brand-700: #7F1324;
    --brand-600: #C4213A;
    --brand-50:  #FBECEE;
    --accent:    #A6192E;
    --ring: 0 0 0 4px rgba(196,33,58,.16);
}

/* Alfa Romeo */
[data-brand="alfa-romeo"] {
    --brand:     #8A1538;
    --brand-700: #6B1029;
    --brand-600: #A81B45;
    --brand-50:  #F8ECF0;
    --accent:    #0E7A5F;
    --ring: 0 0 0 4px rgba(168,27,69,.16);
}

/* Jeep */
[data-brand="jeep"] {
    --brand:     #2E4A3B;
    --brand-700: #22382C;
    --brand-600: #3F6350;
    --brand-50:  #EDF3EF;
    --accent:    #C8A05A;
    --ring: 0 0 0 4px rgba(63,99,80,.18);
}

/* Leapmotor */
[data-brand="leapmotor"] {
    --brand:     #00A19A;
    --brand-700: #007B76;
    --brand-600: #00BFB5;
    --brand-50:  #E6F7F6;
    --accent:    #00BFB5;
    --ring: 0 0 0 4px rgba(0,191,181,.18);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
.site-header {
    background: var(--card);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 30;
}
.site-header__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.brand-mark {
    width: 40px; height: 40px;
    flex: 0 0 40px;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.brand-mark svg { width: 22px; height: 22px; }
/* Лого на марката, когато има качен файл в img/brands/ (виж README-то там).
   Височината е фиксирана, за да не подскача хедърът при различни файлове. */
.brand-logo {
    height: 40px;
    flex: 0 0 auto;
    width: auto;
    max-width: 160px;
    display: block;
    object-fit: contain;
}
.site-header h1 {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.2;
}
.site-header p {
    margin: 1px 0 0;
    font-size: .8125rem;
    color: var(--muted);
}

/* ---------- Stepper ---------- */
.stepper {
    background: var(--card);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 69px;
    z-index: 29;
}
.stepper__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.stepper__item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 0;
    min-width: 0;
    color: var(--muted);
    font-size: .8125rem;
    font-weight: 500;
    /* стъпалата са бутони — нулираме вида по подразбиране */
    background: none;
    border: none;
    padding: 4px 2px;
    margin: 0;
    font-family: inherit;
    text-align: left;
    cursor: default;
    border-radius: 8px;
}
.stepper__item.is-clickable { cursor: pointer; }
.stepper__item.is-clickable:hover { color: var(--brand); background: var(--brand-50); }
.stepper__item.is-clickable:hover .stepper__num { border-color: var(--brand); color: var(--brand); }
.stepper__item:focus-visible { outline: none; box-shadow: var(--ring); }
.stepper__item[disabled] { cursor: default; }
.stepper__num {
    flex: 0 0 26px;
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 1.5px solid var(--line-2);
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 700;
    background: var(--card);
    transition: .2s;
}
.stepper__label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stepper__item.is-active { color: var(--brand); font-weight: 700; }
.stepper__item.is-active .stepper__num {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}
.stepper__item.is-done { color: var(--ink-2); }
.stepper__item.is-done .stepper__num {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-50);
}
.stepper__bar { display: none; }

/* ---------- Layout ---------- */
.page {
    max-width: 780px;
    margin: 0 auto;
    padding: 28px 20px 120px;
}
.page.is-wide { max-width: 1120px; }

/* Вградена в iframe (html.is-embedded, виж wizard.php): без заглавен блок,
   стъпките залепват най-горе, формата започва веднага. */
.is-embedded .site-header { display: none; }
.is-embedded .stepper { top: 0; }
.is-embedded .page { padding-top: 16px; padding-bottom: 32px; }
/* Домакинът (AEM iframe компонент) не може да променя височината на
   iframe-а от скрипт, затова формата трябва да се побира във фиксирана
   височина на всяка стъпка: списъкът със сервизи скролира вътре в
   картата си, а бутоните стоят в потока (sticky bottom в iframe без скрол
   би ги закачил в долния край на самия iframe, извън екрана). */
.is-embedded .nav { position: static; box-shadow: none; }
/* На десктоп картата и списъкът остават както са (560px / 520px). Само на
   тесен екран списъкът се ограничава, за да не расте стъпката. */
@media (max-width: 900px) {
    .is-embedded .center-list { max-height: 400px; overflow-y: auto; }
}
@media (max-width: 420px) {
    .is-embedded .tiles { gap: 8px; }
    .is-embedded .tile { min-height: 46px; padding: 9px 10px; }
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    padding: 28px 30px;
}

.step { animation: fade-in .25s ease-out; }
.step[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.step__head { margin-bottom: 22px; }
.step__head h2 {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -.02em;
}
.step__head h2:focus { outline: none; }
.step__head p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .9375rem;
}

/* ---------- Buttons ---------- */
.btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: var(--r-md);
    font: inherit;
    font-weight: 600;
    padding: 13px 22px;
    min-height: 50px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn[hidden] { display: none; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-700); }
.btn--primary:disabled { background: var(--line-2); cursor: default; }
.btn--ghost {
    background: var(--card);
    border-color: var(--line-2);
    color: var(--ink-2);
}
.btn--ghost:hover { border-color: var(--muted); background: #FCFCFD; }
.btn--lg { min-height: 56px; font-size: 1.0625rem; padding: 15px 28px; }
.btn--block { display: flex; width: 100%; }
.btn--link {
    background: none; border: none; padding: 0; min-height: 0;
    color: var(--brand-600); font-weight: 600; cursor: pointer;
    text-decoration: underline; font-size: .875rem;
}

/* ---------- Fields ---------- */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field > label,
.field-label {
    display: block;
    margin-bottom: 6px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--ink-2);
}
.req { color: var(--err); margin-left: 2px; }

.input {
    display: block;
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-size: .9375rem;
    color: var(--ink);
    background: var(--card);
    border: 1px solid var(--line-2);
    border-radius: var(--r-md);
    min-height: 48px;
    transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: #98A2B3; }
.input:hover { border-color: #B0B7C3; }
.input:focus { outline: none; border-color: var(--brand-600); box-shadow: var(--ring); }
.input.is-invalid { border-color: var(--err); }
.input.is-invalid:focus { box-shadow: 0 0 0 4px rgba(180,35,24,.12); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
select.input {
    appearance: none; -webkit-appearance: none;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}
/* Прикачване на файл — родният контрол е скрит зад етикет-бутон */
.filepick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filepick input[type="file"] {
    position: absolute; width: 1px; height: 1px;
    opacity: 0; overflow: hidden; clip: rect(0 0 0 0);
}
.filepick__btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 15px; min-height: 42px;
    border: 1.5px solid var(--line-2); border-radius: var(--r-md);
    background: var(--card);
    font-size: .875rem; font-weight: 600; color: var(--ink-2);
    cursor: pointer; transition: .15s;
    margin: 0;
}
.filepick__btn:hover { border-color: var(--brand-600); color: var(--brand); }
.filepick input[type="file"]:focus-visible + .filepick__btn { box-shadow: var(--ring); }
.filepick__btn svg { width: 16px; height: 16px; color: var(--brand); }
.filepick__name {
    font-size: .8438rem; color: var(--muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%;
}
.filepick.has-file .filepick__name { color: var(--ink); font-weight: 600; }
.filepick__clear {
    border: none; background: none; padding: 4px; cursor: pointer;
    color: var(--muted); border-radius: 6px; line-height: 0;
}
.filepick__clear:hover { color: var(--err); background: var(--err-bg); }
.filepick__clear svg { width: 15px; height: 15px; }
.filepick__clear[hidden] { display: none; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

.hint { margin: 6px 0 0; font-size: .8125rem; color: var(--muted); }
.hint--ok { color: var(--ok); }
.err {
    margin: 6px 0 0;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--err);
}
.err[hidden] { display: none; }

.fieldset {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 18px 18px 6px;
    margin: 22px 0 0;
    background: #FCFCFD;
}
.fieldset > legend {
    padding: 0 8px;
    margin-left: -8px;
    font-size: .8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
}

/* ---------- Step 1: map + service list ---------- */
.locator {
    display: grid;
    grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.locator__tools { margin-bottom: 12px; }
.search {
    display: flex;
    gap: 8px;
}
.search__field { position: relative; flex: 1 1 auto; min-width: 0; }
.search .input { padding-left: 42px; }
.search__icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    color: var(--muted);
    pointer-events: none;
}
.btn--geo {
    flex: 0 0 auto;
    padding: 12px 14px;
    min-height: 48px;
    white-space: nowrap;
}
.btn--geo svg { width: 18px; height: 18px; }

.locator__count {
    margin: 12px 0 8px;
    font-size: .8125rem;
    color: var(--muted);
}

.center-list {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
}
.center-card {
    width: 100%;
    text-align: left;
    background: var(--card);
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    padding: 14px 16px;
    cursor: pointer;
    font: inherit;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.center-card:hover { border-color: var(--brand-600); box-shadow: var(--shadow-sm); }
.center-card:focus-visible { outline: none; box-shadow: var(--ring); }
.center-card.is-selected {
    border-color: var(--brand);
    background: var(--brand-50);
    box-shadow: var(--shadow-sm);
}
.center-card__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.center-card__name {
    font-weight: 700;
    font-size: .9375rem;
    color: var(--ink);
    letter-spacing: -.01em;
}
.center-card__dist {
    flex: 0 0 auto;
    font-size: .75rem;
    font-weight: 700;
    color: var(--brand-600);
    background: var(--brand-50);
    border-radius: 999px;
    padding: 2px 9px;
}
.center-card__addr {
    display: block;
    margin: 4px 0 0;
    font-size: .8438rem;
    color: var(--muted);
}
.center-card__tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .02em;
    border-radius: 999px;
    padding: 3px 9px;
    background: #F2F4F7;
    color: var(--ink-2);
}
.tag--warn { background: var(--warn-bg); color: var(--warn); }
.tag--ok { background: var(--ok-bg); color: var(--ok); }
.center-card__pick {
    margin-top: 10px;
    display: none;
    justify-content: flex-end;
    font-size: .8125rem;
    font-weight: 700;
    color: var(--brand);
    align-items: center;
    gap: 6px;
}
.center-card.is-selected .center-card__pick { display: flex; }

.locator__map {
    position: sticky;
    top: 148px;
    height: 560px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    background: #E9EDF2;
}
#wMap { width: 100%; height: 100%; }
.map-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 24px;
    text-align: center;
    color: var(--muted);
    font-size: .875rem;
}

/* Leaflet marker pins */
.pin {
    width: 30px; height: 40px;
    display: block;
    filter: drop-shadow(0 2px 3px rgba(16,24,40,.35));
}
.leaflet-container { font: inherit; }
.leaflet-popup-content-wrapper { border-radius: var(--r-md); }
.leaflet-popup-content { margin: 12px 14px; font-size: .875rem; }
.leaflet-popup-content strong { display: block; margin-bottom: 2px; }
.leaflet-popup-content .btn { margin-top: 10px; min-height: 38px; padding: 8px 14px; font-size: .8125rem; }

/* ---------- Step 2: date & slots ---------- */
.picked-center {
    border: 1px solid var(--line);
    background: #FCFCFD;
    border-radius: var(--r-md);
    margin-bottom: 22px;
    overflow: hidden;
}
/* Снимката е лента отгоре — панорамните кадри на центровете (~1000x270)
   се показват цели, вместо да бъдат изрязани в квадратче. Няма ли снимка,
   лентата изчезва и остава само редът с името. */
.picked-center__photo { display: none; }
.picked-center__photo.has-photo {
    display: block;
    width: 100%;
    height: 132px;
    background: #EEF1F5;
    border-bottom: 1px solid var(--line);
}
.picked-center__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.picked-center__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}
.picked-center__row > svg {
    flex: 0 0 20px; width: 20px; height: 20px;
    color: var(--brand);
}
.picked-center__body { flex: 1 1 auto; min-width: 0; }
.picked-center__name { font-weight: 700; font-size: .9375rem; }
.picked-center__addr { font-size: .8438rem; color: var(--muted); }

.days {
    display: flex;
    scrollbar-width: thin;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 10px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}
.day {
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: 76px;
    padding: 10px 4px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    background: var(--card);
    cursor: pointer;
    font: inherit;
    text-align: center;
    transition: .15s;
}
.day:hover { border-color: var(--brand-600); }
.day__dow { display: block; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.day__num { display: block; font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.day__mon { display: block; font-size: .75rem; color: var(--muted); }
.day.is-selected {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}
.day.is-selected .day__dow,
.day.is-selected .day__mon { color: rgba(255,255,255,.8); }
/* Проверката на периода тече: дните са леко затъмнени, но се цъкат — часовете
   за ден идват бързо, а пълен ден после се заключва сам. */
.days.is-loading { opacity: .75; }
.day.is-off {
    opacity: .5;
    cursor: not-allowed;
    background: repeating-linear-gradient(
        135deg, transparent, transparent 5px, rgba(16,24,40,.045) 5px, rgba(16,24,40,.045) 10px);
}
.day.is-off:hover { border-color: var(--line); }

.days-more { position: relative; margin-top: 10px; }

/* Избор на друга дата: наш бутон отпред, родният input отзад */
.datepick {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    min-height: 44px;
    border: 1.5px solid var(--line-2);
    border-radius: var(--r-md);
    background: var(--card);
    font: inherit;
    font-size: .9063rem;
    font-weight: 600;
    color: var(--ink-2);
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.datepick:hover { border-color: var(--brand-600); color: var(--brand); }
.datepick:focus-visible { outline: none; box-shadow: var(--ring); }
.datepick svg { width: 17px; height: 17px; color: var(--brand); }
.datepick.is-set { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }

.datepick__native {
    position: absolute;
    left: 14px; bottom: 0;
    width: 1px; height: 1px;
    opacity: 0;
    border: 0; padding: 0;
    pointer-events: none;
}
/* Браузър без showPicker() — тогава показваме родния контрол */
.days-more.is-native .datepick { display: none; }
.days-more.is-native .datepick__native {
    position: static; width: auto; height: auto; opacity: 1;
    pointer-events: auto;
    padding: 10px 14px; min-height: 44px;
    border: 1.5px solid var(--line-2); border-radius: var(--r-md);
    font: inherit; font-size: .9063rem; color: var(--ink);
}

/* Работно време и най-ранна дата */
.daymeta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 14px;
}
.daymeta__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .8438rem;
    color: var(--ink-2);
}
.daymeta__item svg { width: 15px; height: 15px; color: var(--muted); flex: 0 0 15px; }
.daymeta__item strong { font-weight: 700; color: var(--ink); }
.daymeta__off { color: var(--muted); }

.slots-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 22px 0 10px;
}
.slots-head h3 { margin: 0; font-size: 1rem; font-weight: 700; }

.slot-group { margin-bottom: 18px; }
.slot-group__title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    margin-bottom: 8px;
}
.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 8px;
}
.slot {
    padding: 11px 6px;
    min-height: 46px;
    border: 1.5px solid var(--line);
    background: var(--card);
    color: var(--ink-2);
    border-radius: 10px;
    font: inherit;
    font-weight: 600;
    font-size: .9375rem;
    cursor: pointer;
    transition: .15s;
}
.slot:hover { border-color: var(--brand-600); color: var(--brand); }
.slot.is-selected { background: var(--brand); border-color: var(--brand); color: #fff; }

.empty-state {
    border: 1px dashed var(--line-2);
    border-radius: var(--r-md);
    padding: 22px;
    text-align: center;
    color: var(--muted);
    font-size: .9375rem;
    background: #FCFCFD;
}
.skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 8px;
}
.skeleton span {
    height: 46px;
    border-radius: 10px;
    background: linear-gradient(90deg, #EEF0F4 25%, #F7F8FA 37%, #EEF0F4 63%);
    background-size: 400% 100%;
    animation: shimmer 1.2s infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* "Няма подходящ час? Намерете най-близкия сервиз" под часовете */
.nearby {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 22px;
    padding: 14px 16px;
    border: 1px dashed var(--line-2);
    border-radius: var(--r-md);
    background: #FCFCFD;
}
.nearby p { margin: 0; font-size: .9063rem; color: var(--ink-2); font-weight: 600; }
.nearby .btn { min-height: 44px; padding: 10px 16px; font-size: .9063rem; }
.nearby .btn svg { width: 17px; height: 17px; }

/* ---------- Step 4: reason tiles ---------- */
.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.tile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    background: var(--card);
    cursor: pointer;
    font-size: .9063rem;
    font-weight: 600;
    color: var(--ink-2);
    transition: .15s;
    min-height: 60px;
}
.tile:hover { border-color: var(--brand-600); }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile svg { flex: 0 0 22px; width: 22px; height: 22px; color: var(--brand); }
.tile.is-selected {
    border-color: var(--brand);
    background: var(--brand-50);
    color: var(--brand);
}
.tile-note { font-size: .6875rem; font-weight: 600; color: var(--warn); display: block; }

/* ---------- Radios / checkboxes ---------- */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    cursor: pointer;
    font-size: .8438rem;
    font-weight: 600;
    color: var(--ink-2);
    transition: .15s;
}
.choice input { accent-color: var(--brand); width: 15px; height: 15px; margin: 0; }
.choice:hover { border-color: var(--brand-600); }
.choice.is-selected { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }

.check {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    margin-top: 12px;
    cursor: pointer;
    font-size: .875rem;
    color: var(--ink-2);
    background: #FCFCFD;
}
.check input {
    flex: 0 0 18px;
    width: 18px; height: 18px;
    margin: 2px 0 0;
    accent-color: var(--brand);
}
.check a { color: var(--brand-600); }

/* ---------- Модал ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(16,24,40,.55); }
.modal__box {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 88vh;
    overflow-y: auto;
    background: var(--card);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    animation: fade-in .18s ease-out;
}
.modal__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 18px 20px 12px;
    border-bottom: 1px solid var(--line);
}
.modal__head h3 { margin: 0; font-size: 1.0625rem; font-weight: 700; }
.modal__x {
    flex: 0 0 34px; width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border: none; background: none; border-radius: 8px;
    color: var(--muted); cursor: pointer;
}
.modal__x:hover { background: #F2F4F7; color: var(--ink); }
.modal__x svg { width: 18px; height: 18px; }
.modal__body { padding: 16px 20px 22px; }
.modal__body p { margin: 0 0 12px; font-size: .9375rem; color: var(--ink-2); }

.vin-figure { margin: 0 0 14px; }
.vin-figure svg, .vin-figure img {
    display: block; width: 100%; height: auto;
    border: 1px solid var(--line); border-radius: var(--r-md);
}
/* Без качена снимка се показва вградената схема; с качена — обратното. */
.vin-figure img { display: none; }
.vin-figure.has-photo img { display: block; }
.vin-figure.has-photo svg { display: none; }
.vin-figure figcaption {
    margin-top: 8px; text-align: center;
    font-size: .8125rem; color: var(--muted);
}

/* Връзка „Навигирай“ към Google Maps */
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    font-size: .8125rem;
    font-weight: 700;
    color: var(--brand-600);
    text-decoration: none;
    white-space: nowrap;
}
.nav-link:hover { text-decoration: underline; }
.nav-link svg { width: 15px; height: 15px; }
.picked-center__row .nav-link { margin-top: 0; flex: 0 0 auto; }

/* ---------- Решения за мобилност ---------- */
.mobility { display: grid; gap: 10px; }
.mob {
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    background: var(--card);
    overflow: hidden;
    transition: border-color .15s, background .15s;
}
.mob.is-selected { border-color: var(--brand); background: var(--brand-50); }
.mob__head {
    display: flex; align-items: flex-start; gap: 11px;
    padding: 13px 15px; cursor: pointer;
}
.mob__head input { flex: 0 0 18px; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); }
.mob__title { font-weight: 700; font-size: .9375rem; color: var(--ink); }
.mob__short { display: block; font-size: .8125rem; color: var(--muted); margin-top: 1px; }
.mob__price {
    display: inline-block; margin-top: 5px;
    font-size: .75rem; font-weight: 700;
    background: #F2F4F7; color: var(--ink-2);
    border-radius: 999px; padding: 2px 9px;
}
.mob__more {
    background: none; border: none; padding: 0; margin-top: 6px;
    color: var(--brand-600); font: inherit; font-size: .8125rem; font-weight: 600;
    cursor: pointer; text-decoration: underline;
}
.mob__body { padding: 0 15px 14px 44px; font-size: .875rem; color: var(--ink-2); }
.mob__body[hidden] { display: none; }
.mob__body a { color: var(--brand-600); }

/* ---------- Summary ---------- */
.summary { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.summary__row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--card);
}
.summary__row:last-child { border-bottom: none; }
.summary__label {
    flex: 0 0 34%;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--muted);
}
.summary__value { flex: 1 1 auto; min-width: 0; font-size: .9063rem; }
.summary__value .sub { display: block; color: var(--muted); font-size: .8125rem; }
.summary__edit {
    flex: 0 0 auto;
    background: none; border: none; padding: 4px 2px;
    color: var(--brand-600); font: inherit; font-size: .8125rem; font-weight: 700;
    cursor: pointer; text-decoration: underline;
}

.captcha { margin: 20px 0 4px; }

/* ---------- Result ---------- */
.result { text-align: center; padding: 12px 0 4px; }
.result__icon {
    width: 64px; height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.result__icon svg { width: 32px; height: 32px; }
.result--ok .result__icon { background: var(--ok-bg); color: var(--ok); }
.result--fail .result__icon { background: var(--err-bg); color: var(--err); }
.result h2 { margin: 0 0 10px; font-size: 1.5rem; letter-spacing: -.02em; }
.result p { margin: 0 auto 8px; max-width: 48ch; color: var(--ink-2); }
.result .summary { margin-top: 22px; text-align: left; }

/* ---------- Nav ---------- */
.nav {
    display: flex;
    gap: 12px;
    margin: 26px -30px -28px;
    padding: 16px 30px;
    background: var(--card);
    border-top: 1px solid var(--line);
    border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.nav[hidden] { display: none; }
.nav .btn { flex: 1 1 0; }
.nav .btn--ghost { flex: 0 0 auto; min-width: 140px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .locator { grid-template-columns: 1fr; }
    .locator__map { position: static; height: 300px; order: -1; }
    .center-list { max-height: none; overflow: visible; }
}

@media (max-width: 720px) {
    .stepper__inner { padding: 10px 16px; display: block; }
    .stepper__item { display: none; }
    .stepper__item.is-active {
        display: flex;
        font-size: .875rem;
    }
    .stepper__bar {
        display: block;
        height: 4px;
        border-radius: 999px;
        background: var(--line);
        margin-top: 10px;
        overflow: hidden;
    }
    .stepper__bar i {
        display: block; height: 100%;
        background: var(--brand);
        border-radius: 999px;
        transition: width .3s ease;
    }
    .page { padding: 16px 12px 100px; }
    .card { padding: 20px 16px; border-radius: var(--r-md); }
    .step__head h2 { font-size: 1.1875rem; }
    .grid-2 { grid-template-columns: 1fr; }
    .picked-center__photo.has-photo { height: 104px; }
    .nav {
        position: sticky;
        bottom: 0;
        z-index: 20;
        margin: 22px -16px -20px;
        padding: 12px 16px;
        border-radius: 0 0 var(--r-md) var(--r-md);
        box-shadow: 0 -4px 16px rgba(16,24,40,.06);
    }
    .nav .btn { min-height: 48px; padding: 12px 14px; }
    .nav .btn--ghost { min-width: 0; flex: 0 0 34%; }
    .tiles { grid-template-columns: 1fr 1fr; }
    .tile { font-size: .8125rem; min-height: 56px; padding: 12px 10px; }
}

@media (max-width: 420px) {
    .tiles { grid-template-columns: 1fr; }
    .search { flex-wrap: wrap; }
    .btn--geo { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}
