/* Правки сайта поверх стилей шаблона. Стили шаблона (main.css, costum.css) не редактируются. */

/* Телефон и email — ссылки, но выглядят как текст шаблона */
.navbar-info a,
.footer-contact a {
    color: inherit;
}
.navbar-info a:hover,
.footer-contact a:hover {
    color: var(--primary, #ff6a00);
}

/* search suggestions */
.header-form {
    position: relative;
}
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 4;
    max-height: 55vh;
    overflow-y: auto;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.search-suggestions__item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--heading);
    font-size: 15px;
    line-height: 1.35;
}
.search-suggestions__image {
    flex: none;
    width: 56px;
    height: 44px;
    object-fit: contain;
    border-radius: 4px;
    background: var(--chalk);
}
.search-suggestions__details {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}
.search-suggestions__name,
.search-suggestions__brand {
    display: block;
}
.search-suggestions__brand {
    color: var(--text);
    font-size: 14px;
}
.search-suggestions__price {
    font-weight: 600;
    white-space: nowrap;
}
.search-suggestions__empty,
.search-suggestions__all {
    padding: 12px;
    font-size: 15px;
}
.search-suggestions__all {
    display: block;
    color: var(--primary);
    font-weight: 600;
    text-align: center;
}
.search-suggestions__item:hover,
.search-suggestions__all:hover,
.search-suggestions__item[aria-selected="true"],
.search-suggestions__all[aria-selected="true"] {
    color: var(--heading);
    background: var(--chalk);
}

/* Новости на главной: картинка обрезается до 400×250, как на dev0 */
.blog-img img {
    width: 100%;
    aspect-ratio: 400 / 250;
    object-fit: cover;
}

/* Карточка товара: размеры в атрибутах img нужны от «прыжков» вёрстки, высота — по пропорциям */
.product-image img {
    height: auto;
}

/* Отступ сверху у секций внутренних страниц (после шапки страницы) */
.inner-section {
    padding-top: 40px;
}

/* Шапка страниц (x-page-banner): крошки, заголовок, подзаголовок, оранжевая линия — макет crumb_optica */
.page-head {
    background: var(--white);
    padding: 28px 0 32px;
}
.page-head-inner {
    padding-bottom: 28px;
    border-bottom: 4px solid var(--primary);
}
.page-head-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
    font-size: 16px;
    line-height: 1.4;
}
.page-head-crumbs li {
    color: var(--text);
}
.page-head-crumbs li + li::before {
    content: "/";
    padding: 0 8px;
    color: var(--text);
}
.page-head-crumbs a {
    color: var(--text);
}
.page-head-crumbs a:hover {
    color: var(--primary);
}
.page-head-crumbs .active {
    color: var(--blue);
    font-weight: 600;
}
.page-head-title {
    margin: 0;
    font-size: 44px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--heading);
    overflow-wrap: anywhere;
}
.page-head-subtitle {
    margin: 10px 0 0;
    font-size: 20px;
    line-height: 1.4;
    color: var(--text);
}
@media (max-width: 767px) {
    .page-head {
        padding: 20px 0 24px;
    }
    .page-head-inner {
        padding-bottom: 20px;
        border-bottom-width: 3px;
    }
    .page-head-crumbs {
        margin-bottom: 8px;
        font-size: 14px;
    }
    .page-head-title {
        font-size: 28px;
    }
    .page-head-subtitle {
        font-size: 16px;
    }
}

/* Каталог: боковая панель — блоки категорий и фильтров раскрываются по клику (как на optic-city.ru), списки ограничены по высоте */
.catalog-filters {
    margin-bottom: 25px;
    border-radius: 8px;
    background: var(--white);
    overflow: hidden;
}
.catalog-filter + .catalog-filter {
    border-top: 1px solid var(--border);
}
.catalog-filter-title {
    position: relative;
    display: block;
    padding: 16px 48px 16px 20px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--heading);
    list-style: none;
    cursor: pointer;
    user-select: none;
    transition: color .2s;
}
.catalog-filter-title::-webkit-details-marker {
    display: none;
}
.catalog-filter-title::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 22px;
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-75%) rotate(45deg);
    transition: transform .2s;
}
.catalog-filter[open] > .catalog-filter-title::after {
    transform: translateY(-25%) rotate(-135deg);
}
.catalog-filter-title:hover,
.catalog-filter[open] > .catalog-filter-title {
    color: var(--primary);
}
.catalog-filter-body {
    padding: 0 20px 20px;
}
.catalog-filter-body .shop-widget-list,
.catalog-filter-body .shop-widget-group {
    margin-top: 0;
    margin-bottom: 0;
}
.catalog-filter-body .shop-widget-group + .shop-widget-btn {
    margin-top: 12px;
}
.catalog-filter-body .shop-widget-scroll {
    min-height: 0; /* в шаблоне min-content — он перебивает max-height */
    max-height: 230px;
    overflow-y: auto;
}
.catalog-filters noscript .shop-widget-btn {
    display: block;
    width: calc(100% - 40px);
    margin: 0 20px 20px;
}

/* Каталог до 991px: сортировка, под ней фильтры, затем товары. В шаблоне (content-reverse) фильтры
   под всеми товарами. Колонка товаров «растворяется» (display: contents), её блоки и фильтры
   встают в общий столбец по order; отступы как у колонки */
@media (max-width: 991px) {
    .shop-part .content-reverse {
        flex-direction: column;
    }
    .shop-part .content-reverse > .col-lg-9 {
        display: contents;
    }
    .shop-part .content-reverse > .col-lg-9 > * {
        order: 3;
        margin-left: calc(var(--bs-gutter-x) * .5);
        margin-right: calc(var(--bs-gutter-x) * .5);
    }
    .shop-part .content-reverse > .col-lg-9 > .row {
        margin-left: 0;
        margin-right: 0;
    }
    .shop-part .content-reverse > .col-lg-9 > .row:first-child {
        order: 1;
    }
    .shop-part .content-reverse > .col-lg-3 {
        order: 2;
    }
}

/* Каталог: поиск по значениям фильтра (бренды) */
.catalog-filter-search {
    display: block;
    width: 100%;
    height: 40px;
    margin-bottom: 14px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--chalk);
    font-size: 15px;
}
.catalog-filter-search:focus {
    border-color: var(--primary);
    outline: none;
}
.catalog-filter-empty {
    margin: 0;
    color: var(--gray);
    font-size: 15px;
}

/* Каталог: бегунок цены — два input[type=range] на одной шкале, ручки по краям выбранного отрезка */
.range-slider {
    position: relative;
    height: 24px;
    margin-bottom: 14px;
}
.range-slider-line {
    position: absolute;
    top: 50%;
    left: 11px;
    right: 11px;
    height: 4px;
    margin-top: -2px;
    border-radius: 2px;
    background: var(--border);
}
.range-slider-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    border-radius: 2px;
    background: var(--primary);
}
.range-slider input[type=range] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 24px;
    margin: 0;
    padding: 0;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}
.range-slider input[type=range]:focus {
    outline: none;
}
.range-slider input[type=range]::-webkit-slider-runnable-track {
    height: 24px;
    background: none;
}
.range-slider input[type=range]::-moz-range-track {
    background: none;
}
.range-slider input[type=range]::-webkit-slider-thumb {
    box-sizing: border-box;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border: 3px solid var(--primary);
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
    cursor: pointer;
    pointer-events: auto;
    -webkit-appearance: none;
    appearance: none;
}
.range-slider input[type=range]::-moz-range-thumb {
    box-sizing: border-box;
    width: 22px;
    height: 22px;
    border: 3px solid var(--primary);
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
    cursor: pointer;
    pointer-events: auto;
}
.range-slider input[type=range]:focus-visible::-webkit-slider-thumb {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}
.range-slider input[type=range]:focus-visible::-moz-range-thumb {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

/* Каталог: категории слева, активная выделена */
.catalog-categories a {
    color: inherit;
}
.catalog-categories li.active,
.catalog-categories li.active a {
    color: var(--primary);
    font-weight: 500;
}
.catalog-empty {
    padding: 40px 25px;
    margin-bottom: 25px;
    border-radius: 8px;
    background: var(--white);
    overflow-wrap: anywhere;
}
/* SEO-текст категории под списком товаров */
.catalog-text {
    margin-top: 30px;
    padding: 30px;
    border-radius: 8px;
    background: var(--white);
}
.catalog-text ul,
.catalog-text ol {
    padding-left: 20px;
    margin-bottom: 15px;
}
.catalog-text ul {
    list-style: disc;
}
.catalog-text ol {
    list-style: decimal;
}
.catalog-text p {
    margin-bottom: 12px;
}

/* Карточка товара */
.details-name {
    font-size: 26px;
}
.details-preview li img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #fff;
}
.details-thumb li img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.details-order-note a {
    color: var(--primary);
}
.details-order-note {
    margin-top: 12px;
    font-size: 14px;
}
.product-details-frame .table td a {
    color: var(--primary);
}

/* Бренды: без логотипа — название в круге того же размера */
.brand-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    padding: 15px;
    border-radius: 50%;
    background: var(--white);
    font-weight: 600;
    font-size: 17px;
    line-height: 1.2;
    text-align: center;
    color: var(--heading, #39404a);
}
.brands-page .brand-meta a {
    color: inherit;
}
.brands-page .brand-meta p {
    font-size: 14px;
}

/* Заголовки блоков на карточке товара — h2 (для структуры страницы), размер как у h3 шаблона */
.product-details-frame .frame-title {
    font-size: 26px;
}

/* Бренды: логотипы обрезаны по содержимому — вписываются в круг с отступом, а не растягиваются */
.brands-page .brand-media img {
    padding: 28px;
    object-fit: contain;
    background: var(--white);
}

/* Бренды: шаблон задаёт карточке ширину 200px для слайдера, в сетке она по ширине колонки */
.brands-page .brand-wrap {
    width: auto;
}

/* Пагинация на телефоне: кнопки меньше, чтобы ряд помещался в экран */
@media (max-width: 575px) {
    .pagination .page-item {
        margin-left: 3px;
    }
    .pagination .page-item:first-child {
        margin-left: 0;
    }
    .pagination .page-link {
        width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 13px;
    }
}

/* Сортировка на телефоне: шаблон даёт блоку 130px, подписи сортировки длиннее */
@media (max-width: 575px) {
    .top-filter .filter-short {
        width: 100%;
    }
    .top-filter .filter-short .nice-select {
        width: 100%;
    }
}

/* Информационные страницы и новости */
.content-prose {
    overflow-wrap: anywhere;
}
.content-prose p + p {
    margin-top: 16px;
}
.content-prose h2,
.content-prose h3 {
    margin-bottom: 12px;
}
.content-prose ul,
.content-prose ol {
    margin: 12px 0;
    padding-left: 24px;
}
.content-prose ul {
    list-style: disc;
}
.content-prose ol {
    list-style: decimal;
}
.content-prose img {
    max-width: 100%;
    height: auto;
}

.about-page {
    background: var(--white);
}
.about-content p {
    margin-bottom: 40px;
}
.about-img {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-left: 50px;
}
.about-img img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.blog-grid .blog-img {
    display: block;
}
.blog-grid .bottom-paginate {
    justify-content: center;
}
.blog-details-thumb {
    display: block;
    width: 100%;
    border-radius: 10px 10px 0 0;
}
.blog-details-content {
    padding: 50px;
    background: var(--white);
    border-radius: 0 0 10px 10px;
}
.blog-details-date {
    margin-bottom: 16px;
}
.blog-details-date i {
    margin-right: 6px;
    color: var(--primary);
}

/* Контакты (правка 2): карта слева, вкладки населённых пунктов и раскрывающиеся салоны справа */
.stores-part__heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 40px;
    margin-bottom: 30px;
}
.stores-part__heading h2 {
    font-size: 40px;
    line-height: 1.2;
}
.stores-part__heading p {
    font-size: 17px;
    color: var(--gray);
}
.stores {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    padding: 20px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(57, 64, 74, 0.06);
}
.stores__map {
    min-height: 560px;
    overflow: hidden;
    border-radius: 16px;
    background: var(--border);
}
.stores__map iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 560px;
    border: 0;
}
/* Метка салона на карте (JS API): точка привязки — кончик «капли» */
.map-pin {
    position: absolute;
    left: -16px;
    top: -42px;
    display: flex;
    align-items: center;
    cursor: pointer;
}
.map-pin svg {
    flex: none;
    width: 32px;
    height: 42px;
    filter: drop-shadow(0 3px 4px rgba(57, 64, 74, 0.3));
    transition: width .2s, height .2s;
}
.map-pin path {
    fill: var(--primary);
}
.map-pin circle {
    fill: var(--white);
}
.map-pin.is-active {
    left: -22px;
    top: -58px;
}
.map-pin.is-active svg {
    width: 44px;
    height: 58px;
}
.map-pin__label {
    margin: 0 0 18px 6px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--heading);
    width: max-content;
    max-width: 220px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(57, 64, 74, 0.18);
}
.stores__side {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-height: 560px;
}
.stores__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.stores__tab {
    padding: 10px 24px;
    font-size: 16px;
    font-weight: 500;
    color: var(--heading);
    background: #f5f5f5;
    border: 1px solid var(--border);
    border-radius: 30px;
    transition: color .2s, background-color .2s, border-color .2s;
}
.stores__tab:hover,
.stores__tab.is-active {
    color: var(--primary);
    background: #fff1e5;
    border-color: var(--primary);
}
.stores__list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
}
.store-item {
    margin-bottom: 10px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: background-color .3s, border-color .3s;
}
.store-item.is-open {
    background: #fff1e5;
    border-color: #ffc9a0;
}
.store-item__head {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 20px;
    text-align: left;
    background: none;
    border: 0;
}
.store-item__head > .fa-map-marker-alt {
    width: 20px;
    font-size: 20px;
    color: var(--gray);
    text-align: center;
}
.store-item.is-open .store-item__head > .fa-map-marker-alt {
    color: var(--primary);
}
.store-item__address {
    flex: 1;
    font-size: 17px;
    font-weight: 500;
    color: var(--heading);
}
.store-item.is-open .store-item__address {
    font-weight: 700;
}
.store-item__arrow {
    color: var(--gray);
    transition: transform .3s;
}
.store-item.is-open .store-item__arrow {
    transform: rotate(90deg);
}
/* Плавное раскрытие: строка сетки от 0fr до 1fr */
.store-item__body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .35s ease;
}
.store-item.is-open .store-item__body {
    grid-template-rows: 1fr;
}
.store-item__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    min-height: 0;
    overflow: hidden;
    padding: 0 20px;
}
.store-item.is-open .store-item__inner {
    padding-bottom: 18px;
}
.store-item__info {
    flex: 1 1 260px;
}
.store-item__row {
    display: flex;
    gap: 14px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
}
.store-item__row i {
    width: 20px;
    margin-top: 3px;
    font-size: 17px;
    color: var(--gray);
    text-align: center;
}
.store-item__row b {
    color: var(--heading);
}
.store-item__phone a {
    font-size: 18px;
    font-weight: 700;
    color: var(--heading);
}
.store-item__phone a:hover {
    color: var(--primary);
}
.store-item__call {
    display: inline-flex;
    text-transform: none;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
}
.stores-empty li {
    margin-bottom: 8px;
    font-size: 17px;
}

@media (max-width: 991px) {
    .stores {
        grid-template-columns: 1fr;
    }
    .stores__map,
    .stores__map iframe {
        min-height: 380px;
    }
    .stores__side {
        max-height: none;
    }
    .stores__list {
        overflow: visible;
        padding-right: 0;
    }
}

@media (max-width: 575px) {
    .stores-part__heading h2 {
        font-size: 28px;
    }
    .stores-part__heading p {
        font-size: 15px;
    }
    .stores {
        padding: 12px;
        gap: 16px;
    }
    .stores__map,
    .stores__map iframe {
        min-height: 300px;
    }
    .stores__tab {
        padding: 8px 16px;
        font-size: 14px;
    }
    .store-item__head {
        padding: 14px;
    }
    .store-item__address {
        font-size: 15px;
    }
    .store-item__inner {
        padding: 0 14px;
    }
    .store-item.is-open .store-item__inner {
        padding-bottom: 14px;
    }
}

@media (max-width: 991px) {
    .about-img {
        margin-left: 0;
    }
}

@media (max-width: 575px) {
    .blog-details-content {
        padding: 20px;
    }
}

/* Карточка товара: форма заявки */
.lead-form {
    margin-top: 20px;
}
.lead-form .form-group {
    margin-bottom: 15px;
}
.lead-form textarea.form-control {
    height: auto;
    min-height: 70px;
    resize: vertical;
}
.lead-form-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.lead-form-consent {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 16px;
    font-size: 14px;
}
.lead-form-consent a {
    color: var(--primary);
}
.lead-form-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.lead-form-buttons .form-btn-group {
    width: 100%;
}
.lead-form-buttons .form-btn-group:disabled {
    opacity: 0.6;
    cursor: wait;
}
.lead-form .lead-form-secondary {
    background: var(--border);
    color: var(--heading);
}
.lead-form .lead-form-secondary:hover {
    background: var(--primary);
    color: var(--white);
}
.lead-form-error {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--red, #e53935);
}
.lead-form-status {
    margin: 15px 0 0;
    padding: 12px 15px;
    border-radius: 8px;
    background: rgba(17, 155, 69, 0.1);
    color: var(--heading);
}
.lead-form-status.is-error {
    background: rgba(229, 57, 53, 0.1);
}
@media (max-width: 575px) {
    .lead-form-buttons {
        grid-template-columns: 1fr;
    }
}

/* Избранное */
.wishlist-part .table-scroll {
    overflow-x: auto;
}
.wishlist-part .table-action {
    white-space: nowrap;
}
.wishlist-part [data-favorites-empty] .btn {
    margin-top: 12px;
}
.wishlist-part [data-favorites-clear] {
    margin-top: 20px;
}

/* Главная, «Бренды»: две бегущие строки. Ширина дорожки — два одинаковых списка, сдвиг на половину даёт бесшовный круг */
.brand-marquee-part {
    padding: 70px 0;
    background: var(--white);
}
.brand-marquee {
    display: grid;
    gap: 30px;
}
.brand-marquee__row {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.brand-marquee__track {
    display: flex;
    width: max-content;
    animation: brand-marquee var(--marquee-duration, 90s) linear infinite;
}
.brand-marquee__row--right .brand-marquee__track {
    animation-direction: reverse;
}
@keyframes brand-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.brand-marquee__item {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 90px;
    margin-right: 30px;
    padding: 0 10px;
}
.brand-marquee__item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(1);
    opacity: .55;
    transition: filter .3s, opacity .3s;
}
.brand-marquee__name {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--gray);
    opacity: .8;
    transition: color .3s, opacity .3s;
}
.brand-marquee__item:hover img,
.brand-marquee__item:focus-visible img {
    filter: none;
    opacity: 1;
}
.brand-marquee__item:hover .brand-marquee__name,
.brand-marquee__item:focus-visible .brand-marquee__name {
    color: var(--primary);
    opacity: 1;
}
@media (max-width: 767px) {
    .brand-marquee-part {
        padding: 50px 0;
    }
    .brand-marquee {
        gap: 15px;
    }
    .brand-marquee__item {
        width: 130px;
        height: 65px;
        margin-right: 15px;
    }
    .brand-marquee__name {
        font-size: 16px;
    }
}
/* Без анимации — строки прокручиваются вручную */
@media (prefers-reduced-motion: reduce) {
    .brand-marquee__row {
        overflow-x: auto;
    }
    .brand-marquee__track {
        animation: none;
    }
}

/* Главная, «О компании»: фон — градиент шаблона (countdown-part), слайдер слева, карточка с текстом заходит на него справа */
.about-part {
    padding: 80px 0;
}
.about-part__heading p {
    margin-top: 10px;
    font-size: 18px;
}
.about-part__wrap {
    display: flex;
    align-items: flex-start;
}
.about-part__media {
    position: relative;
    z-index: 2;
    flex: 0 0 42%;
    max-width: 42%;
}
.about-slider {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: var(--white);
    box-shadow: 0 15px 35px rgba(0, 0, 0, .08);
}
.about-slider__slide img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
}
/* До запуска slick видна только первая картинка */
.about-slider:not(.slick-initialized) .about-slider__slide + .about-slider__slide {
    display: none;
}
.about-part__counter {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 25px;
    font-size: 18px;
    font-weight: 500;
    color: var(--gray);
}
.about-part__current {
    font-size: 44px;
    font-weight: 600;
    line-height: 1;
    color: var(--primary);
}
.about-part__delimiter {
    font-size: 32px;
}
.about-part__card {
    position: relative;
    z-index: 1;
    flex: 1;
    margin: 50px 0 0 -60px;
    padding: 45px 45px 40px 105px;
    border-radius: 12px;
    background: var(--white);
    box-shadow: 0 20px 45px rgba(0, 0, 0, .08);
}
.about-part__card h1 {
    margin-bottom: 20px;
    font-size: 30px;
    line-height: 1.25;
    text-transform: uppercase;
}
.about-part__card p {
    margin-bottom: 30px;
}
.about-part__arrows {
    display: flex;
    gap: 15px;
    margin-top: 35px;
}
.about-part__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--white);
    font-size: 18px;
    color: var(--heading);
    transition: all linear .3s;
}
.about-part__arrow:hover,
.about-part__arrow:focus-visible {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}
@media (max-width: 991px) {
    .about-part {
        padding: 60px 0;
    }
    .about-part__wrap {
        flex-direction: column;
        align-items: stretch;
    }
    .about-part__media {
        flex: none;
        max-width: 460px;
        width: 100%;
        margin: 0 auto;
    }
    .about-part__counter {
        position: absolute;
        left: 25px;
        bottom: -65px;
        margin: 0;
    }
    .about-part__card {
        margin: -40px 0 0;
        padding: 110px 25px 30px;
    }
    .about-part__card h1 {
        font-size: 24px;
    }
}
@media (max-width: 575px) {
    .about-part__counter {
        left: 20px;
    }
    .about-part__card {
        padding: 105px 20px 25px;
    }
    .about-part__card p {
        display: -webkit-box;
        -webkit-line-clamp: 8;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .about-part__current {
        font-size: 34px;
    }
}

/* Подвал: логотип, контакты, каталог, информация; внизу способы оплаты и предупреждение */
@font-face {
    font-family: 'Oswald';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url(../fonts/oswald/oswald-300-cyrillic.woff2) format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Oswald';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url(../fonts/oswald/oswald-300-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
.footer-part .footer-widget {
    margin-bottom: 35px;
}
.footer-widget--brand {
    height: calc(100% - 35px);
    padding-right: 30px;
}
@media (min-width: 992px) {
    .footer-widget--brand {
        border-right: 1px solid var(--border);
    }
}
.footer-part .footer-title {
    font-size: 20px;
    margin-bottom: 20px;
}
.footer-part .footer-contact li {
    margin-bottom: 15px;
}
.footer-part .footer-contact li i {
    flex: none;
    width: 26px;
    font-size: 22px;
    text-align: center;
}
.footer-part .footer-contact a,
.footer-menu a {
    color: var(--text);
    transition: color .3s;
}
.footer-part .footer-contact a:hover,
.footer-menu a:hover {
    color: var(--primary);
}
.footer-menu li {
    margin-bottom: 10px;
}
.footer-menu li:last-child {
    margin-bottom: 0;
}
.footer-part .footer-bottom {
    margin-top: 40px;
    border-radius: 8px;
    gap: 15px;
    flex-wrap: wrap;
}
.footer-payments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.footer-payments li {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 38px;
    border-radius: 6px;
    background: var(--white);
}
.footer-payments img {
    width: 41px;
    height: 32px;
}
.footer-warning {
    margin: 0;
    padding: 30px 0 35px;
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-weight: 300;
    font-size: 36px;
    line-height: 1.15;
    text-align: center;
    text-transform: uppercase;
    color: #878f92;
}
@media (max-width: 991px) {
    .footer-warning {
        font-size: 26px;
    }
}
/* На телефоне снизу фиксированное меню: шаблон оставлял под него запас в footer-bottom, теперь он под предупреждением */
@media (max-width: 767px) {
    .footer-part .footer-bottom {
        padding-bottom: 25px;
    }
    .footer-warning {
        padding: 20px 0 85px;
        font-size: 20px;
    }
}

/* Карточка товара (по образцу optic-city): название сверху, фото, цена в полосе снизу. Высота не зависит от длины названия */
.product-card {
    display: flex;
    flex-direction: column;
    padding: 68px 0 0;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
}
.product-card:hover {
    border-color: transparent;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .1);
}
.product-card__labels {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    pointer-events: none;
}
.product-card__label {
    padding: 2px 9px;
    border: 1px solid;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    text-transform: uppercase;
}
.product-card__label--new {
    color: var(--green);
    border-color: rgba(17, 183, 107, .3);
    background: rgba(17, 183, 107, .08);
}
.product-card__label--sale {
    color: var(--red);
    border-color: rgba(246, 94, 94, .35);
    background: rgba(246, 94, 94, .08);
}
.product-card__wish {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--chalk);
    font-size: 17px;
    color: var(--heading);
    transition: color .3s;
}
.product-card__wish:hover,
.product-card__wish.active {
    color: var(--primary);
}
.product-card__wish.active i {
    font-weight: 900;
}
/* Заголовок — ссылка на товар, растянутая на всю карточку */
.product-card__title {
    display: flex;
    flex-direction: column;
    height: 68px;
    padding: 0 15px;
    text-align: center;
    color: var(--heading);
}
.product-card__title::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}
.product-card__name,
.product-card__model {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}
.product-card__name {
    -webkit-line-clamp: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 26px;
}
.product-card__model {
    -webkit-line-clamp: 2;
    margin-top: 2px;
    font-size: 14px;
    line-height: 20px;
    color: var(--text);
}
.product-card__title--single .product-card__name {
    -webkit-line-clamp: 2;
    line-height: 24px;
}
.product-card__title:hover .product-card__name {
    color: var(--primary);
}
.product-card__photo {
    aspect-ratio: 4 / 3;
    padding: 5px 15px 15px;
}
.product-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-card__prices {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 62px;
    margin-top: auto;
    padding: 0 10px;
    border-radius: 0 0 10px 10px;
    background: var(--chalk);
    white-space: nowrap;
    transition: background-color .3s, color .3s;
}
.product-card__price {
    font-size: 20px;
    font-weight: 600;
    line-height: 26px;
    color: var(--heading);
    transition: color .3s;
}
.product-card__price--old {
    font-size: 15px;
    font-weight: 400;
    color: var(--gray);
}
.product-card:hover .product-card__prices {
    background: var(--primary);
}
.product-card:hover .product-card__price {
    color: var(--white);
}
.product-card:hover .product-card__price--old {
    color: rgba(255, 255, 255, .75);
}
@media (max-width: 575px) {
    .product-card {
        padding-top: 64px;
    }
    .product-card__title {
        height: 62px;
        padding: 0 10px;
    }
    .product-card__name {
        font-size: 16px;
        line-height: 22px;
    }
    .product-card__model {
        font-size: 13px;
        line-height: 18px;
    }
    .product-card__price {
        font-size: 17px;
    }
    .product-card__price--old {
        font-size: 13px;
    }
    .product-card__prices {
        gap: 6px;
        height: 52px;
        padding: 0 6px;
    }
}

/* Преимущества (intro-part): иконки из SVG через mask, белеют при наведении */
.intro-part {
    padding: 50px 0;
}
@media (max-width: 991px) {
    .intro-part {
        padding: 40px 0 10px; /* у .intro-wrap здесь свой margin-bottom: 30px */
    }
}
.intro-icon {
    margin-right: 10px;
    flex-shrink: 0;
}
.intro-icon i {
    width: 60px;
    height: 60px;
    position: relative;
}
.intro-icon__img::before {
    content: "";
    position: absolute;
    inset: 9px;
    background: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}

/* Карта (главная «Как нас найти», «Контакты»): белая подложка со скруглением */
.contact-map {
    padding: 20px;
    background-color: #fff;
    border-radius: 20px;
}

/* Первый экран главной (правка 1.10): категории слева и слайдер справа одной высоты */
.hero-part .row > [class*="col-"] {
    display: flex;
    flex-direction: column;
}
.hero-cats {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 26px 0 12px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(57, 64, 74, 0.06);
}
.hero-cats__title {
    padding: 0 26px 10px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--heading);
}
.hero-cats__list {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.hero-cats__list li {
    flex: 1;
    display: flex;
}
.hero-cats__link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 26px;
    position: relative;
    color: var(--heading);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    transition: background .2s, color .2s;
}
.hero-cats__link::after {
    content: "";
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: 0;
    border-bottom: 1px solid var(--border);
}
.hero-cats__list li:last-child .hero-cats__link::after {
    display: none;
}
.hero-cats__link::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: var(--primary);
    opacity: 0;
    transition: opacity .2s;
}
.hero-cats__link:hover,
.hero-cats__link:focus-visible {
    color: var(--heading);
    background: #fff4ec;
}
.hero-cats__link:hover::before,
.hero-cats__link:focus-visible::before {
    opacity: 1;
}
.hero-cats__icon {
    flex: 0 0 44px;
    height: 24px;
    background: var(--heading);
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
    transition: background .2s;
}
.hero-cats__name {
    flex: 1;
}
.hero-cats__arrow {
    font-size: 12px;
    color: var(--gray);
    transition: color .2s, transform .2s;
}
.hero-cats__link:hover .hero-cats__icon {
    background: var(--primary);
}
.hero-cats__link:hover .hero-cats__arrow {
    color: var(--primary);
    transform: translateX(3px);
}

.hero-slider {
    flex: 1;
    margin-bottom: 0;
    border-radius: 20px;
    overflow: hidden;
}
.hero-slide {
    position: relative;
    height: 480px;
    background: #f6e6da;
}
.hero-slide__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
}
.home-grid-slider .hero-slide__img {
    border-radius: 0;
}
.hero-slide__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    height: 100%;
    max-width: 480px;
    padding: 40px 50px 60px;
}
.hero-slide__title {
    margin-bottom: 16px;
    font-size: 42px;
    line-height: 1.15;
    font-weight: 700;
    color: var(--heading);
}
.hero-slide__text {
    margin-bottom: 30px;
    font-size: 19px;
    line-height: 1.45;
    color: var(--sub-heading);
}
.hero-slide__btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 15px 30px;
    font-size: 17px;
    font-weight: 500;
    color: var(--white);
    background: var(--primary);
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(255, 113, 0, 0.25);
    transition: background .2s, box-shadow .2s;
}
.hero-slide__btn:hover,
.hero-slide__btn:focus-visible {
    color: var(--white);
    background: #e66400;
    box-shadow: 0 10px 24px rgba(255, 113, 0, 0.35);
}
.hero-slide__btn i {
    transition: transform .2s;
}
.hero-slide__btn:hover i {
    transform: translateX(4px);
}
.hero-slider .bamdik,
.hero-slider .dandik {
    display: none !important;
}
.hero-slider.slider-dots ul {
    left: 50px;
    bottom: 26px;
    transform: none;
}
.hero-slider.slider-dots ul li {
    background: rgba(57, 64, 74, 0.25);
    box-shadow: none;
}
.hero-slider.slider-dots ul li.slick-active {
    background: var(--primary);
}

@media (max-width: 1199px) {
    .hero-slide {
        height: 440px;
    }
    /* картинка уже, текст ложится на неё — светлая подложка слева */
    .hero-slide::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        background: linear-gradient(90deg, rgba(255, 248, 242, 0.92) 0%, rgba(255, 248, 242, 0.7) 50%, rgba(255, 248, 242, 0) 80%);
    }
    .hero-slide__content {
        z-index: 2;
        max-width: 400px;
        padding: 30px 36px 56px;
    }
    .hero-slide__title {
        font-size: 34px;
    }
    .hero-slider.slider-dots ul {
        left: 36px;
    }
}
@media (max-width: 991px) {
    .hero-part .row > [class*="col-"]:first-child {
        display: none; /* на телефоне категории доступны в боковой панели (кнопка «Категории» внизу) */
    }
}
@media (max-width: 767px) {
    /* картинка сверху, текст под ней */
    .hero-slide {
        height: auto;
        background: var(--white);
    }
    .hero-slide::before {
        display: none;
    }
    .hero-slide__img {
        position: static;
        aspect-ratio: 2 / 1;
        height: auto;
    }
    .hero-slide__content {
        height: auto;
        min-height: 230px;
        justify-content: flex-start;
        padding: 20px 20px 50px;
    }
    .hero-slide__title {
        font-size: 24px;
        margin-bottom: 10px;
    }
    .hero-slide__text {
        font-size: 15px;
        margin-bottom: 18px;
    }
    .hero-slide__btn {
        padding: 12px 22px;
        font-size: 16px;
    }
    .hero-slider.slider-dots ul {
        left: 20px;
        bottom: 18px;
    }
}

/* Главная, «Популярные товары»: переключатель категорий — капсула с иконками, активная вкладка оранжевая (макет popular_optica) */
.popular-switch {
    display: flex;
    max-width: 930px;
    margin: 0 auto 40px;
    padding: 6px;
    border-radius: 999px;
    background: var(--white);
    box-shadow: 0 10px 30px rgba(20, 35, 60, .1);
}
.popular-switch__tab {
    position: relative;
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 60px;
    padding: 8px 20px;
    border: 0;
    border-radius: 999px;
    background: none;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--heading);
    cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s;
}
/* разделители между вкладками, у активной и её соседа справа их нет */
.popular-switch__tab + .popular-switch__tab::before {
    content: "";
    position: absolute;
    top: 25%;
    left: 0;
    width: 1px;
    height: 50%;
    background: var(--border);
    transition: opacity .2s;
}
.popular-switch__tab.is-active::before,
.popular-switch__tab.is-active + .popular-switch__tab::before {
    opacity: 0;
}
.popular-switch__tab:hover {
    color: var(--primary);
}
.popular-switch__tab.is-active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 6px 16px rgba(255, 113, 0, .35);
}
.popular-switch__tab:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}
.popular-switch__icon {
    flex: 0 0 44px;
    height: 24px;
    background: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}
@media (max-width: 767px) {
    .popular-switch {
        margin-bottom: 25px;
        padding: 4px;
        border-radius: 22px;
    }
    .popular-switch__tab {
        flex-direction: column;
        gap: 4px;
        min-height: 64px;
        padding: 8px 6px;
        border-radius: 18px;
        font-size: 13px;
        text-align: center;
    }
    .popular-switch__icon {
        flex-basis: 22px;
        width: 40px;
    }
}
