/*
 * /where-to-buy/
 * Визуальная часть максимально возвращена к присланной верстке.
 * wtb-dev-* оставлены только для JS/карты/динамических состояний.
 */
.wtb-dev {
    --wtb-orange: #EF7D00;
    --wtb-text: #313131;
    --wtb-muted: #5C5C5C;
    color: var(--wtb-text);
}

.wtb-dev .btn-tag.active span {
    color: #fff !important;
}


/* У outline-кнопок на оранжевом hover текст должен оставаться белым. */
.wtb-dev .btn.btn-outline-primary:hover {
    color: #fff !important;
}

.wtb-dev .btn.btn-outline-primary:hover * {
    color: #fff !important;
}

.wtb-dev .btn-tag.btn-tag--certified,
.wtb-dev .border-certified {
    border-color: var(--wtb-orange) !important;
}

.wtb-dev .btn-tag.btn-tag--certified.active {
    background: var(--wtb-orange);
    border-color: var(--wtb-orange);
    color: #fff;
}

.wtb-dev .btn-tag.btn-tag--certified.active span {
    color: #fff !important;
}

.city-select {
    height: 50px;
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: 4px;
    color: #313131;
    background-color: #fff;
}

.address-search-box {
    width: 100%;
}

@media (min-width: 1200px) {
    .address-search-box {
        max-width: 680px;
    }
}

@media (min-width: 1400px) {
    .address-search-box {
        max-width: 870px;
    }
}

.wtb-dev .address-search-box .input-group,
.wtb-dev .address-search-box .search-catalog {
    height: 50px;
}

.wtb-dev .btn-search {
    width: 58px;
    min-width: 58px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

.wtb-dev .wtb-dev-near-button {
    height: 50px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px;
    white-space: nowrap;
}

.wtb-dev-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.stores-map__table-body {
    height: fit-content;
}

.stores-map__table {
    width: 100%;
    margin: 0 auto;
}

.stores-map__table-body-wrapper {
    display: flex;
    flex-direction: column;
    position: relative;
    height: fit-content;
    row-gap: 24px;
}

@media (min-width: 1200px) {
    .stores-map__table-body-wrapper {
        display: grid;
        grid-template-columns: 480px minmax(0, 1fr);
        column-gap: 16px;
    }
}

.stores-map__left {
    overflow-y: visible;
    padding-right: 0;
    height: fit-content;
}

.stores-map__left-stores {
    display: grid !important;
    grid-template-columns: repeat(1, 1fr);
    column-gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

@media (min-width: 768px) {
    .stores-map__left-stores {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .stores-map__left {
        display: block;
        height: 680px;
        overflow-y: auto;
        padding-right: 4px;
        scrollbar-width: thin;
    }

    .stores-map__left-stores {
        display: block !important;
    }
}

.stores-map__left-content {
    margin-top: 0;
}

.stores-map__left-store {
    padding: 24px;
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: 4px;
    margin-bottom: 8px;
    background: #fff;
}

.store-box-tag {
    flex-wrap: wrap;
}

.border-lightblue {
    border: 1px solid var(--bs-border-color);
    border-radius: 4px;
    width: fit-content;
    padding: 2px 4px;
    font-size: 0.75rem;
    line-height: 1.2;
}

.stores-map__left-store h5 {
    color: #313131;
    font-weight: 500;
}

.stores-map__left-store-address {
    display: flex;
    color: #313131;
    margin-bottom: 16px;
    font-size: inherit;
    line-height: 1.45;
}

.stores-map__left-store-address .wtb-dev-icon-svg {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    color: #313131;
    margin-top: 0;
}

.stores-map__left-store-contacts {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    gap: 6.83px;
    padding: 0;
    list-style: none;
}

.stores-map__left-store-contacts li a {
    display: grid;
    grid-template-columns: 16.83px minmax(0, auto);
    column-gap: 6.83px;
    align-items: center;
    width: fit-content;
    color: #313131 !important;
    text-decoration: none;
    transition: all 320ms ease-in-out;
}

.stores-map__left-store-contacts li a svg,
.stores-map__left-store-schedule svg {
    position: static !important;
    width: 16.83px !important;
    height: 16.83px !important;
    min-width: 16.83px !important;
    min-height: 16.83px !important;
    max-width: 16.83px !important;
    max-height: 16.83px !important;
    color: #313131 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

.stores-map__left-store-contacts li a:hover {
    color: #313131 !important;
    text-shadow: 0.85px 0 #313131;
}

.stores-map__left-store-schedule {
    color: #313131;
    line-height: 1.45;
}

.stores-map-box {
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: stretch;
    max-height: 680px;
}

.wtb-dev-map {
    width: 100%;
    height: 680px;
    overflow: hidden;
    background: #eef1f3;
}

/* Детальная страница — классы и сетка из исходной верстки. */
.detail-box-tag {
    height: fit-content;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .detail-box-tag {
        max-width: 50%;
        justify-content: end;
    }
}

.stores-detail-contacts {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    flex: 1 1 auto;
    padding: 0;
    list-style: none;
    color: #313131;
}

@media (min-width: 768px) {
    .stores-detail-contacts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        text-align: center;
    }
}

@media (min-width: 1200px) {
    .stores-detail-contacts {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.stores-detail-contacts li {
    justify-self: start;
    min-width: 0;
}

@media (min-width: 768px) {
    .stores-detail-contacts li {
        justify-self: center;
    }
}

.stores-detail-contacts li svg {
    position: static !important;
    flex: 0 0 20px;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    color: #5C5C5C !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

.stores-detail-contacts a,
.stores-detail-contacts a:link,
.stores-detail-contacts a:visited {
    color: #313131 !important;
    text-decoration: none;
}

.stores-detail-contacts a:hover {
    color: #313131 !important;
}

.stores-contacts-info {
    font-size: 0.875rem;
    line-height: 1.3;
}

.wtb-dev-detail-route {
    flex: 0 0 auto;
}

.wtb-dev-detail-route .btn {
    min-width: 168px;
}

.wtb-dev-detail__text {
    color: #313131;
    line-height: 1.55;
}

.wtb-dev-detail__text p:last-child {
    margin-bottom: 0;
}

.wtb-dev-detail__text a {
    text-decoration: none;
}

.wtb-dev-detail__text a:hover {
    color: var(--wtb-orange);
}

.map-detail {
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.wtb-dev-map--detail {
    height: 480px;
    margin-top: 0;
}

.wtb-dev-near {
    margin-top: 72px;
}

.partners-near-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 768px) {
    .partners-near-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .partners-near-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.partners-near-grid .stores-map__left-store {
    margin-bottom: 0;
    min-height: 100%;
}

.link-arrow-orange {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding-right: 20.48px;
    font-weight: 500;
    width: fit-content;
    transition: all 320ms ease-in-out;
    color: #EF7D00 !important;
    text-decoration: none;
}

.link-arrow-orange::before {
    content: "";
    position: absolute;
    right: -0.25rem;
    top: 50%;
    display: block;
    height: 0.65rem;
    width: 0.65rem;
    transform-origin: 75% 75%;
    box-shadow: 2px 2px #EF7D00;
    transform: rotate(-45deg) translate(0, -100%);
    transition: transform 200ms ease-in-out;
}

.link-arrow-orange:hover::before {
    transform: rotate(-45deg) translate(50%, -50%);
}

/* Маркетплейсы — из исходной верстки. */
.wtb-dev-marketplaces {
    margin: 82px 0 20px;
}

.marketplaces .section-title {
    text-align: center;
}

@media (min-width: 768px) {
    .marketplaces .section-title {
        text-align: start;
    }
}

.marketplaces-item {
    border: none;
}

.marketplaces-item img {
    height: 35px !important;
    transition: all 320ms ease-in-out;
    width: auto;
    max-width: 190px;
    object-fit: contain;
}

.marketplaces-item a:hover img {
    transform: scale(1.05);
}

.marketplaces__marketplaces {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 24px 34px;
    margin-top: 28px;
}

@media (min-width: 768px) {
    .marketplaces__marketplaces {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 34px 52px;
    }
}

/* Balloon карты остаётся динамическим, но визуально повторяет карточку. */
.wtb-dev-balloon {
    min-width: 285px;
    max-width: 340px;
    font-family: inherit;
    color: #313131;
}

.wtb-dev-balloon__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.wtb-dev-balloon__tag {
    border: 1px solid var(--bs-border-color, #dfe4e8);
    border-radius: 4px;
    padding: 2px 4px;
    color: #777;
    font-size: 11px;
}

.wtb-dev-balloon__tag--certified {
    border-color: var(--wtb-orange);
}

.wtb-dev-balloon__title {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 500;
}

.wtb-dev-balloon__line {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 5px 0;
    font-size: 13px;
    line-height: 1.35;
}

.wtb-dev-balloon__line a {
    color: #313131 !important;
    text-decoration: none;
}

.wtb-dev-balloon__icon {
    position: static !important;
    display: block !important;
    flex: 0 0 16px !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    margin: 1px 0 0 !important;
    padding: 0 !important;
    transform: none !important;
    color: #313131 !important;
    overflow: visible !important;
}

.wtb-dev-balloon__more {
    display: inline-block;
    margin-top: 8px;
    color: var(--wtb-orange) !important;
    font-weight: 500;
    text-decoration: none;
}

/* Защита SVG в кнопках от глобальных правил шаблона. */
.wtb-dev .wtb-dev-search__button svg.wtb-dev-search-icon,
.wtb-dev .wtb-dev-near-button svg.wtb-dev-near-icon {
    position: static !important;
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    flex: 0 0 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    color: #fff !important;
}

.wtb-dev .wtb-dev-near-button > span {
    color: #fff !important;
}

@media (max-width: 1199.98px) {
    .wtb-dev-map {
        height: 520px;
    }

    .wtb-dev-detail-route {
        margin-left: 24px;
    }
}

@media (max-width: 767.98px) {
    .wtb-dev-filter-tags {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        overflow: visible;
        gap: 8px;
        padding-bottom: 0;
    }

    .wtb-dev .wtb-dev-filter-tags .btn-tag {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        white-space: normal;
    }

    .wtb-dev-map {
        height: 420px;
    }

    .wtb-dev-map--detail {
        height: 390px;
    }

    .wtb-dev-detail-route {
        margin-left: 0;
        width: 100%;
    }

    .wtb-dev-detail-route .btn {
        width: 100%;
    }

    .wtb-dev-marketplaces {
        margin-top: 56px;
    }
}
