/**
 * Store Cluster – nowy widok strony /nasze-sklepy (wyszukiwarka punktów sprzedaży KOSPEL)
 * Szablon: ../templates/hook/front.tpl, JS: ../js/frontend.js (nadpisania modułu w motywie).
 * Ładowany tylko na stronie sklepów (storecluster.php, hookActionFrontControllerSetMedia).
 * Wszystkie reguły zawężone do .sc-locator, żeby nie wpływać na resztę serwisu.
 */
.elementor-element.elementor-element-ya1sjjt {
    background-color: #eeedee;
    background-image: url(https://kospel.pl/img/cms/pompy-ciepla_21.png);
    background-position: bottom center;
    background-repeat: no-repeat;
    background-size: auto;
    margin-top: 32px;
    margin-bottom: 0px;
    padding: 0px 0px 0px 0px;

    form {
        width: 100%;
        max-width: 100%;
    }
}

.elementor-element.elementor-element-7hlnib3 .elementor-heading-title {
    font-size: 30px;
    font-weight: bold;
    line-height: 1.3em;
    letter-spacing: px;
}

.elementor-element.elementor-element-ya1sjjt>.elementor-container {
    max-width: 1300px;
}

.sc-locator {
    --sc-navy: #012d5a;
    --sc-navy-dark: #011e41;
    --sc-red: #eb352a;
    --sc-red-dark: #d02a20;
    --sc-text: #3d4b5c;
    --sc-muted: #7a8696;
    --sc-border: #dfe4ea;
    --sc-bg: #f4f7fb;
    --sc-radius: 8px;
    --sc-shadow: 0 6px 24px rgba(1, 45, 90, .08);

    font-family: "Roboto", "Open Sans", Arial, sans-serif;
    color: var(--sc-text);
    position: relative;
}

.sc-locator * {
    box-sizing: border-box;
}

/* ---------- Hero ---------- */
.sc-hero {
    position: relative;
    margin: 0 calc(50% - 50vw);
    display: flex;
    align-items: center;
    /* grafika 1920x510 w pełnej szerokości + 72px pasa pod kartę wyszukiwarki, która nachodzi na hero */
    min-height: calc(26.5625vw + 72px);
    padding: 32px 0 104px;
    /* #022552 = kolor krawędzi grafiki, więc pas pod nią łączy się bez szwu */
    background: #022552 var(--sc-hero-img, none) center top / 100% auto no-repeat;
    color: #fff;
    overflow: hidden;
}

.sc-hero__inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.sc-hero__content {
    /* węziej niż pinezka na grafice (ok. 42% szerokości) */
    max-width: 430px;
}

.sc-hero__title {
    margin: 0 0 16px;
    font-size: 44px;
    line-height: 1.15;
    font-weight: 700;
    color: #fff;
}

.sc-hero__title span {
    color: var(--sc-red);
}

.sc-hero__lead {
    margin: 0 0 32px;
    font-size: 17px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .9);
}

.sc-hero__actions {
    display: flex;
    /* przyciski w jednym rzędzie – mogą wyjść poza wąską kolumnę tekstu (pod pinezką jest miejsce) */
    flex-wrap: nowrap;
    width: max-content;
    gap: 16px;
}

/* ---------- Przyciski ---------- */
.sc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}

.sc-btn--primary {
    background: var(--sc-red);
    color: #fff;
}

.sc-btn--primary:hover,
.sc-btn--primary:focus {
    background: var(--sc-red-dark);
    color: #fff;
    text-decoration: none;
}

.sc-btn--outline {
    background: transparent;
    border-color: rgba(255, 255, 255, .7);
    color: #fff;
}

.sc-btn--outline:hover,
.sc-btn--outline:focus {
    background: #fff;
    color: var(--sc-navy);
    text-decoration: none;
}

.sc-btn--ghost {
    background: #fff;
    border-color: var(--sc-navy);
    border-radius: 20px;
    color: var(--sc-navy);
    padding: 8px 20px;
}

.sc-btn--ghost:hover {
    background: var(--sc-navy);
    color: #fff;
}

/* ---------- Karta wyszukiwarki ---------- */
.sc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.sc-search {
    position: relative;
    z-index: 2;
    margin-top: -72px;
    padding: 28px 32px 20px;
    background: #fff;
    border-radius: var(--sc-radius);
    box-shadow: var(--sc-shadow);
}

.sc-search__title {
    margin: 0 0 24px;
    font-size: 16px;
    font-weight: 500;
    color: var(--sc-navy);
}

.sc-search__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    column-gap: 36px;
    row-gap: 16px;
    align-items: start;
}

.sc-field {
    position: relative;
}

.sc-field .form-control {
    height: 48px;
    padding: 0 16px 0 44px;
    border: 1px solid var(--sc-border);
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    color: var(--sc-text);
    box-shadow: none;
}

.sc-field .form-control:focus {
    border-color: var(--sc-navy);
    outline: 0;
}

.sc-field select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23012d5a' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.sc-field--noicon .form-control {
    padding-left: 16px;
}

.sc-field__icon {
    position: absolute;
    top: 50%;
    left: 15px;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    color: var(--sc-navy);
    pointer-events: none;
}

.sc-radius {
    padding-top: 6px;
}

.sc-radius__label {
    display: block;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--sc-navy);
}

.sc-locator .slidecontainer {
    padding: 0;
}

.sc-locator .slider {
    display: block;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    cursor: pointer;
    height: 3px;
    border-radius: 2px;
    background: var(--sc-border);
    opacity: 1;
}

.sc-locator .slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    background: var(--sc-navy);
}

.sc-locator .slider::-moz-range-thumb {
    border-radius: 50%;
    width: 14px;
    height: 14px;
    border: 0;
    background: var(--sc-navy);
}

.sc-search__submit {
    grid-column: 1;
}

.sc-search__submit .sc-btn {
    width: 100%;
    height: 48px;
    font-size: 15px;
}

.sc-search__count {
    grid-column: 1;
    margin: 0;
    text-align: center;
    font-size: 12px;
    color: var(--sc-muted);
}



/* ---------- Mapa ---------- */
.sc-section-title {
    margin: 44px 0 20px;
    font-size: 24px;
    font-weight: 700;
    color: var(--sc-navy);
}

.sc-locator #map {
    width: 100%;
    min-height: 0;
    height: 420px;
    margin: 0;
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius);
    overflow: hidden;
}

/* ---------- Lista punktów ---------- */
.sc-locator #stores-table {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.sc-locator #stores-table:empty {
    display: none;
}

.sc-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: #fff;
    border: 0;
    border-radius: var(--sc-radius);
    box-shadow: var(--sc-shadow);
}

.sc-card.is-hidden {
    display: none !important;
}

.sc-card__name {
    margin: 0 0 10px !important;
    font-size: 16px;
    font-weight: 700;
    color: var(--sc-navy);
}

.sc-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.sc-card__badges:empty {
    display: none;
}

.sc-card__badges .store_tag img {
    max-height: 22px;
    padding: 0 !important;
}

.sc-badge,
.sc-card__badges .store_category {
    display: inline-block;
    margin: 0;
    padding: 4px 8px;
    border-radius: 3px;
    background: var(--sc-navy);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
}

.sc-card__address {
    margin: 0 0 14px;
    font-style: normal;
    font-size: 13px;
    line-height: 1.7;
    color: var(--sc-text);
}

.sc-card__contact {
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
    font-size: 13px;
}

.sc-card__contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.sc-card__contact a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--sc-red);
    word-break: break-all;
}

.sc-card__contact .material-icons {
    flex: 0 0 16px;
    font-size: 16px;
    color: var(--sc-red);
}

.sc-card__distance {
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--sc-muted);
}

.sc-card__distance a {
    color: var(--sc-navy);
    text-decoration: underline;
}

.sc-card__more {
    margin-top: auto;
    padding: 0;
    border: 0;
    background: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--sc-navy);
    cursor: pointer;
}

.sc-card__more:hover {
    color: var(--sc-red);
}

.sc-loadmore {
    margin: 28px 0 0;
    text-align: center;
}

.sc-loadmore[hidden] {
    display: none;
}

/* ---------- Konsultacja ---------- */
.sc-consultation {
    display: flex;
    margin: 48px 0;
    background: #fff;
    border-radius: var(--sc-radius);
    box-shadow: var(--sc-shadow);
    overflow: hidden;
    scroll-margin-top: 100px;
}

/* zdjęcie jest tłem – gdy pliku nie ma, kolumna zostaje pustym miejscem */
.sc-consultation__image {
    flex: 0 0 26%;
    background: var(--sc-consult-img, none) center top / cover no-repeat;
}

.sc-consultation__body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 32px;
}

.sc-consultation__title {
    margin: 0 0 20px;
    font-size: 28px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--sc-navy);
}

.sc-consultation__title span {
    color: var(--sc-red);
}

/* ---------- Pasek korzyści ---------- */
.sc-benefits {
    margin: 0 calc(50% - 50vw);
    margin-bottom: -55px;
    padding: 28px 0;
    background: var(--sc-navy-dark);
    color: #fff;
}

.sc-benefits__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    list-style: none;
}

.sc-benefits__list li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.sc-benefits__list img {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
}

/* ---------- Responsywność ---------- */
@media (max-width: 991px) {
    .sc-benefits__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sc-benefits__list li {
        justify-content: flex-start;
    }

    .sc-consultation__image {
        display: none;
    }

    .sc-hero {
        padding: 40px 0 100px;
    }

    /* na wąskich ekranach produkty z grafiki wchodziłyby pod tekst – przyciemnienie */
    .sc-hero {
        min-height: 0;
        background: linear-gradient(rgba(2, 37, 82, .85), rgba(2, 37, 82, .85)),
            #022552 var(--sc-hero-img, none) left center / cover no-repeat;
    }

    .sc-hero__content {
        max-width: none;
    }

    .sc-hero__actions {
        flex-wrap: wrap;
        width: auto;
    }

    .sc-hero__title {
        font-size: 34px;
    }

    .sc-locator #stores-table {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .sc-benefits__list {
        grid-template-columns: minmax(0, 1fr);
    }

    .sc-consultation__body {
        padding: 24px 16px;
    }

    .sc-consultation__title {
        font-size: 22px;
    }

    .sc-search {
        padding: 20px 16px;
    }

    .sc-search__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .sc-locator #map {
        height: 320px;
    }

    .sc-locator #stores-table {
        grid-template-columns: minmax(0, 1fr);
    }

    .sc-hero__title {
        font-size: 28px;
    }
}

/* ---------- Strona sklepów: tło i stary nagłówek ---------- */
.page-stores {
    position: relative;
}

/* tytuł jest w hero – standardowy nagłówek strony byłby drugim H1 */
body#stores .page-header {
    display: none;
}

body#stores #wrapper {
    background: #f4f7fb;
    overflow-x: clip;
}

body#stores #main {
    background: transparent;
}

#content>article.store-item {
    display: none;
}

/* ---------- Nadpisania reguł motywu (mariusz.css: #store-search, .page-stores .store-item, kolory linków) ---------- */
.sc-locator #store-search.sc-search {
    width: auto;
    margin-top: -72px;
}

.sc-locator #store-search .sc-field .form-control {
    padding: 0 40px 0 44px;
    border: 1px solid var(--sc-border);
    border-radius: 4px;
}

.sc-locator #store-search .sc-field--noicon .form-control {
    padding-left: 16px;
}

.sc-locator #store-search .sc-field .form-control:focus {
    border-color: var(--sc-navy);
}

.sc-locator #store-search label {
    margin-bottom: 14px;
}

#content .sc-locator a.sc-btn--primary,
#content .sc-locator a.sc-btn--primary:hover,
#content .sc-locator a.sc-btn--outline {
    color: #fff;
}

#content .sc-locator a.sc-btn--outline:hover {
    color: var(--sc-navy);
}

.page-stores .sc-locator .store-item.sc-card {
    margin: 0;
    border: 0;
    border-radius: var(--sc-radius) !important;
    background: #fff;
    overflow: visible;
}

#content .sc-locator .sc-card__contact a {
    color: var(--sc-red);
}

.sc-locator #store-search .sc-search__submit {
    display: block;
    margin: 0;
}

/* hero bezpośrednio pod okruszkami */
body#stores #wrapper {
    margin-top: 0;
    padding-top: 0;
}

/* Okruszki ukryte. Sam element zostaje, bo jego padding-top (z motywu) robi miejsce
   pod przyklejone menu; dostaje kolor krawędzi grafiki hero, więc zlewa się z nią. */
body#stores .breadcrumb {
    margin: 0;
    padding-bottom: 0;
    background: #022552;
}

body#stores .breadcrumb>* {
    display: none;
}

/* ---------- Formularz konsultacji (Contact Form 7, kolumny składa frontend.js) ---------- */
/* !important: moduł formularza ustawia padding (!important) i max-width (inline) */
.sc-consultation .wpcf7 {
    padding: 0 !important;
}

.sc-consultation .wpcf7 form {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    column-gap: 44px;
    align-items: start;
    width: 100% !important;
    max-width: none !important;
    margin: 0;
}

/* wewnętrzna nazwa formularza z panelu – nagłówek sekcji jest w szablonie */
.sc-consultation .wpcf7 form>h3 {
    display: none;
}

.sc-consultation .wpcf7-response-output {
    grid-column: 1 / -1;
}

.sc-consultation .sc-form__field {
    display: block;
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0;
    color: var(--sc-muted);
    text-transform: lowercase;
}

/* etykiety w panelu są wpisane wersalikami */
.sc-consultation .sc-form__field::first-letter {
    text-transform: uppercase;
}

.sc-consultation .sc-form__field .wpcf7-form-control-wrap {
    display: block;
    margin-top: 4px;
}

.sc-consultation .sc-form__field .form-control {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--sc-border);
    border-radius: 4px;
    background: #fff;
    box-shadow: none;
    font-size: 14px;
    color: var(--sc-text);
    text-transform: none;
}

.sc-consultation .sc-form__field .form-control:focus {
    border-color: var(--sc-navy);
    outline: 0;
}

.sc-consultation .sc-form__field .form-control::placeholder {
    color: #9aa5b3;
}

.sc-consultation .sc-form__col--fields>.wpcf7-form-control-wrap {
    display: block;
    margin: 4px 0 12px;
}

.sc-consultation .wpcf7-submit {
    width: 100%;
    height: 52px;
    margin: 8px 0 0;
    padding: 0 24px;
    border: 0;
    border-radius: 4px;
    background: var(--sc-red);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    transition: background-color .2s;
}

.sc-consultation .wpcf7-submit:hover {
    background: var(--sc-red-dark);
}

.sc-consultation .wpcf7-submit:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* zgody – prawa kolumna */
.sc-consultation .sc-form__col--consents {
    padding-top: 2px;
}

.sc-consultation .sc-form__note {
    display: block;
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--sc-muted);
}

.sc-consultation .sc-form__note:last-child {
    margin: 18px 0 0;
    font-size: 11px;
}

#content .sc-consultation .sc-form__note a {
    font-weight: 700;
    color: var(--sc-navy);
}

.sc-consultation label.accept {
    display: block;
    margin: 0 0 12px;
}

.sc-consultation label.accept label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 18px;
    color: var(--sc-text);
    cursor: pointer;
}

.sc-consultation label.accept .wpcf7-list-item {
    display: block;
    margin: 0;
}

.sc-consultation label.accept input[type="checkbox"] {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1px solid #c9d2dc;
    border-radius: 3px;
    background: #fff center / 12px 12px no-repeat;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.sc-consultation label.accept input[type="checkbox"]:checked {
    border-color: var(--sc-navy);
    background-color: var(--sc-navy);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.2l2.6 2.6L10 3.4' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.sc-consultation label.accept input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--sc-navy);
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .sc-consultation .wpcf7 form {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 20px;
    }
}