/* ========== NEW HEADER STYLES  ========== */

.header-row {
    display: flex;
    align-items: center;
}

form[action="/search/"] input:focus,
form[action="/search/"] input:focus-visible {
    outline: none;
    box-shadow: none;
}

/* Колонка логотипа */
.header-col-logo .logo span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: #ff0405;
    margin-top: 5px;
    letter-spacing: 0.5px;
}

/* Колонка времени работы и email */
.header-col-schedule {
    text-align: center;
}

.header-schedule {
    display: inline-block;
    text-align: center;
}

.header-schedule__time {
    font-size: 14px;
    color: #303030;
    margin-bottom: 5px;
}

.header-schedule__email a {
    font-size: 14px;
    color: #303030;
    text-decoration: none;
}

.header-schedule__email a:hover {
    color: #ff0405;
    text-decoration: underline;
}

/* Колонка телефона */
.header-col-phone {
    text-align: center;
}

.header-phone-block {
    display: inline-block;
    text-align: center;
}

.header-phone {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #303030;
    text-decoration: none;
    margin-bottom: 16px;
}

.header-phone:hover {
    color: #ff0405;
}

/* Кнопка "Обратный звонок" */
.header-callback-btn {
    display: inline-block;
    border-radius: 14px;
    border: 0;
    max-width: 170px;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: bold;
    background-color: #ff0405;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    text-align: center;
}

.header-callback-btn:hover {
    background: #ff8585;
    color: #fff;
    border: 0;
    text-decoration: none;
}

/* Колонка корзины */
.header-col-cart {
    text-align: right;
}

.header-cart {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
}

.header-cart__link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-cart__icon {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 32px;
}

.header-cart__icon img {
    width: 32px;
    height: 32px;
}

.header-cart__count {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background-color: #ff0405;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
    padding: 0 4px;
}

.header-cart__count:empty,
.header-cart__count[data-count="0"] {
    display: none;
}

.header-cart__price {
    margin-left: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #303030;
    white-space: nowrap;
}

/* Мобильная корзина в шапке */
.header-cart--mobile {
    display: none;
}

@media (max-width: 767px) {
    .header-cart--mobile {
        display: block;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }

    .header-cart--mobile .header-cart__link {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: #303030;
    }

    .header-cart--mobile .header-cart__icon {
        position: relative;
        display: block;
        width: auto;
        height: auto;
    }

    .header-cart--mobile .header-cart__icon img {
        width: 36px;
        height: 36px;
    }

    .header-cart--mobile .header-cart__count {
        position: absolute;
        top: -5px;
        right: -5px;
        background: #ff0405;
        color: #fff;
        font-size: 11px;
        font-weight: 600;
        min-width: 18px;
        height: 18px;
        line-height: 18px;
        text-align: center;
        border-radius: 50%;
        padding: 0;
        box-sizing: border-box;
    }

    .header-cart--mobile .header-cart__count:empty,
    .header-cart--mobile .header-cart__count[data-count="0"] {
        display: none;
    }

    .header-cart--mobile .header-cart__price {
        font-size: 14px;
        color: #303030;
        margin-top: 2px;
        margin-left: 0;
    }

    /* Скрываем mbl-btn */
    .mbl-btn {
        display: none !important;
    }

    /* Телефон на мобилке */
    .phone-sm a {
        color: #303030 !important;
        font-size: 21px;
    }

    /* Скрываем график работы */
    .phone-sm .time-work {
        display: none !important;
    }

    /* Позиционирование logo-block */
    .logo-block {
        position: relative;
    }
}

/* Адаптив для средних экранов */
@media (max-width: 1200px) {
    .header-phone {
        font-size: 20px;
    }

    .header-cart__price {
        font-size: 16px;
    }
}

@media (min-width: 960px) {
    .header {
        padding: 10px 0 20px;
    }
}

/* ========== BASKET POPUP STYLES ========== */

.basket-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.basket-popup.is-active {
    display: block;
}

.basket-popup__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.basket-popup__dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.basket-popup__close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.basket-popup__close:hover {
    color: #333;
}

.basket-popup__content {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.basket-popup__info {
    flex: 1;
}

.basket-popup__title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.basket-popup__name {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.basket-popup__price,
.basket-popup__total {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.basket-popup__total {
    font-weight: 700;
    color: #333;
    font-size: 16px;
}

.basket-popup__qty {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.basket-popup__qty > span {
    font-size: 14px;
    color: #666;
}

.basket-popup__qty-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.basket-popup__qty-controls button {
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #333;
}

.basket-popup__qty-controls button:hover {
    background: #f5f5f5;
}

.basket-popup__qty-controls span {
    min-width: 40px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.basket-popup__image {
    width: 150px;
    flex-shrink: 0;
}

.basket-popup__image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.basket-popup__actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.basket-popup__btn {
    padding: 12px 25px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    text-align: center;
}

.basket-popup__btn--secondary {
    background: #f0f0f0;
    color: #333;
}

.basket-popup__btn--secondary:hover {
    background: #e0e0e0;
}

.basket-popup__btn--primary {
    background: #ff0405;
    color: #fff;
}

.basket-popup__btn--primary:hover {
    background: #ff8585;
    color: #fff;
}

body.basket-popup-open {
    overflow: hidden;
}

.header-cart a:hover {
    text-decoration: none;
}

.product-item .order-block {
    display: flex;
    align-items: center;
}

.product-item .order-block .price {
    line-height: 18px;
}

.element_price_old {
    color: #999;
    font-size: 14px;
    text-decoration: line-through;
}

/* ========== BASKET PAGE STYLES ========== */

/* Layout корзины */
.basket-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    padding: 20px 0 40px;
}

.basket-layout__items {
    flex: 1;
    min-width: 0;
}

.basket-layout__items h1 {
    margin-bottom: 25px;
}

.basket-layout__sidebar {
    width: 350px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

/* Пустая корзина */
.basket-alert {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.basket-alert p {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

.basket-alert p:last-child {
    margin-bottom: 0;
}

.basket-alert--info {
    background: #f0f7ff;
    border: 1px solid #cce0ff;
}

.basket-alert--error {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    text-align: left;
    padding: 15px 20px;
}

.basket-alert--error p {
    color: #cc0000;
    margin: 0 0 5px;
}

.basket-alert--success {
    background: #f0fff0;
    border: 1px solid #ccffcc;
}

.basket-alert--success p {
    color: #228822;
    margin: 0;
}

.basket-alert__link {
    display: inline-block;
    padding: 12px 25px;
    background: #ff0405;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
}

.basket-alert__link:hover {
    background: #cc0304;
    color: #fff;
}

/* Список товаров */
.basket-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Товар в корзине */
.basket-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #fff;
}

.basket-item__image {
    width: 100px;
    flex-shrink: 0;
}

.basket-item__image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    max-height: 100px;
    object-fit: contain;
}

.basket-item__content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.basket-item__main {
    flex: 1;
}

.basket-item__name {
    margin-bottom: 8px;
}

.basket-item__name a {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

.basket-item__name a:hover {
    color: #ff0405;
}

.basket-item__price {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.basket-item__controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.basket-item__qty {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.basket-item__qty button {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #333;
    padding: 0;
    line-height: 1;
}

.basket-item__qty button:hover {
    background: #f5f5f5;
}

.basket-item__qty span {
    min-width: 35px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
}

.basket-item__total {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}

.basket-item__remove {
    background: none;
    border: none;
    font-size: 13px;
    cursor: pointer;
    color: #999;
    padding: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.basket-item__remove:hover {
    color: #ff0405;
}

/* Блок сводки */
.basket-summary {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
}

.basket-summary__line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    margin-bottom: 10px;
}

.basket-summary__line:last-child {
    margin-bottom: 0;
}

.basket-summary__line strong {
    font-size: 16px;
    color: #333;
}

/* Форма заказа */
.basket-form {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
}

.basket-form__field {
    display: block;
    margin-bottom: 15px;
}

.basket-form__field span {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.basket-form__field input,
.basket-form__field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.basket-form__field input:focus,
.basket-form__field textarea:focus {
    outline: none;
    border-color: #ff0405;
}

.basket-form__field textarea {
    resize: vertical;
}

.basket-form__agree {
    margin-bottom: 15px;
}

.basket-form__agree label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    line-height: 1.4;
}

.basket-form__agree input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.basket-form__agree span {
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

.basket-form__agree a {
    color: #ff0405;
}

.basket-form__agree a:hover {
    text-decoration: underline;
}

.basket-form__submit {
    width: 100%;
    padding: 12px 25px;
    font-size: 15px;
    font-weight: 600;
    background: #ff0405;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.basket-form__submit:hover {
    background: #cc0304;
}

.header.fixed-top .header-callback-btn {
    display: none;
}

.product-item a.red-btn.add-to-cart-btn {
    font-size: 14px;
}

.basket-popup__actions a:hover {
    text-decoration: none;
}

.detail-page__buy-block .gray-btn {
    font-weight: 700;
    font-family: "FiraSans";
    font-size: 18px;
    letter-spacing: 2px;
    padding: 15px;
    max-width: 240px;
    margin: auto;
    border-radius: 15px;
    display: block;
    cursor: pointer;
    text-align: center;
    text-transform: uppercase;
    border: 2px solid #e0e0e0;
    -webkit-transition: all 0.4s;
    transition: all 0.4s;
}

.detail-page__buy-block .gray-btn:hover {
    background-color: white;
    color: black;
    text-decoration: none;
}

.buy-block__buttons {
    display: flex;
    flex-direction: column;
    row-gap: 15px;
}

/* ========== КНОПКА "УЖЕ В КОРЗИНЕ" ========== */
.add-to-cart-btn.in-cart {
    background-color: #5cb85c !important;
    border-color: #5cb85c !important;
    color: #fff !important;
    cursor: pointer;
}

.add-to-cart-btn.in-cart:hover {
    background-color: #449d44 !important;
    border-color: #449d44 !important;
}

/* Успешная отправка */
.basket-success {
    text-align: center;
    padding: 60px 20px;
}

.basket-success h2 {
    color: #28a745;
    margin-bottom: 15px;
}

.basket-success p {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
}

/* Адаптив корзины */
@media (max-width: 991px) {
    .basket-layout {
        flex-direction: column;
    }

    .basket-layout__sidebar {
        width: 100%;
        position: static;
    }
}

@media (max-width: 576px) {
    .basket-item {
        flex-wrap: wrap;
    }

    .basket-item__image {
        width: 70px;
    }

    .basket-item__content {
        flex: 1 1 calc(100% - 85px);
        flex-direction: column;
    }

    .basket-item__remove {
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    .basket-popup__content {
        flex-direction: column-reverse;
    }

    .basket-popup__image img {
        width: 70%;
    }

    .basket-popup__image {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
        display: flex;
        justify-content: center;
    }

    .basket-popup__actions {
        flex-direction: column;
    }
}


/* ========== NEW HEADER STYLES END ========== */

/* ========== ПЕРЕКЛЮЧАТЕЛЬ КОЛИЧЕСТВА ТОВАРОВ ========== */
.sort {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 14px;
}

.sort ul li {
    font-size: 14px;
}

.per-page {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.per-page-text {
    font-size: 14px;
    color: #000000;
    margin-right: 10px;
}

.per-page-list {
    list-style: none;
    display: flex;
}

.per-page-list li {
    display: inline-block;
}

.per-page-list li a,
.per-page-list li span {
    display: inline-block;
    padding: 3px 8px;
    font-size: 14px;
    color: #000000;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.per-page-list li a:hover {
    /*background: #f5f5f5;*/
    border-color: #ccc;
    color: #333;
}

.per-page-list li.active span {
    background: #ff0405;
    border-color: #ff0405;
    color: #fff!important;
}

.sort .per-page ul li {
    border: none;
}

.sort ul {
    display: flex;
}

.section-description {
    margin-top: 20px;
}
.sort ul li:last-child {
    border-right: none;
}

@media (min-width: 768px) {
    .sort ul li:not(:first-child) {
        margin-left: 0;
    }
}


@media (max-width: 767.5px) {
    .sort {
        flex-direction: column;
        align-items: flex-start;
    }

    .per-page {
        margin-left: 0;
        margin-top: 10px;
    }

    .sort ul li {
        width: unset;
        padding: 0px;
    }

    .sort span.sort-text {
        margin-bottom: 0;
    }
}


@media screen and (max-width: 768px){
    .phone-sm {
        height: 22px;
        overflow: hidden;
    }
    .phone-sm.loaded {
        height: auto;
        overflow: visible;
    }
}

.top_perelink {
    display: block;
}
.top_perelink a {
    display: inline-block;
    border: 1px solid #747474;
    color: #747474;
    padding: 3px 8px;
    border-radius: 30px;
    margin: 0 2px 7px 0;
}
.top_perelink a:hover {
    border: 1px solid #ff0405;
    color: #ff0405;
    text-decoration:none;
}

/* ========== COLLAPSIBLE FILTER STYLES ========== */

/* Заголовок фильтра - кликабельный */
.filter--collapsible .filter__title {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

/* Стрелка в заголовке */
.filter__arrow {
    font-size: 14px;
    transition: transform 0.3s ease;
}

/* Контент фильтра - скрыт по умолчанию */
.filter--collapsible .filter__content {
    display: none;
}

/* Контент фильтра - виден когда развёрнут */
.filter--collapsible.filter--expanded .filter__content {
    display: block;
}

.filter__title {
    margin-bottom: 0;
}

.filter--expanded .filter__title {
    margin-bottom: 30px;
}

/* ========== SORTING STYLES ========== */

.sort-text {
    margin-right: 5px;
}

.sort ul {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.sort ul li {
    border: none;
}

.sort ul li a,
.sort ul li > span {
    display: inline-block;
    border: 1px solid #747474;
    color: #747474;
    padding: 3px 12px;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sort ul li a span {
    color: inherit;
}

.sort ul li a:hover,
.sort ul li a:hover span {
    border-color: #ff0405;
    color: #ff0405;
    text-decoration: none;
}

/* Активный пункт сортировки — красным */
.sort ul li.active > span {
    border-color: #ff0405;
    color: #ff0405;
}

@media (max-width: 767px) {
    .sort-text {
        display: block;
        width: 100%;
        margin-bottom: 8px;
    }
}

/* ========== HEADER PHONE STYLES ========== */

.header-phone-block {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    justify-content: flex-end;
}

.header-phones {
    width: 80%;
}

.fixed-top .header-phones {
    width: 100%;
}

.header-phones .phone {
    display: block;
    font-size: 20px;
    margin-bottom: 10px;
    line-height: unset;
}

.header-phones .phone:last-child,
.header-phones .comagic_phone .phone {
    margin-bottom: 0;
}

.header-telegram {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.telegram-icon {
    display: inline-block;
}

.telegram-icon img {
    display: block;
}

@media (max-width: 1220px) {
    .header-phones {
        width: 100%;
    }
}

@media (max-width: 991px) {
    .header-phones .phone {
        font-size: 16px;
    }

    .header-phone-block {
        gap: 10px;
    }
}

@media (max-width: 767px) {
    .header-phones {
        width: unset;
    }

    .header-phone-block {
        justify-content: flex-start;
    }

    .header-phones .phone {
        margin-bottom: 5px;
    }
}

ul.delivery-list {
    padding-left: 0px;
    margin: 5px 0;
}

ul.delivery-list.marker-list.small li {
    padding-left: 15px;
}

.detail-page__info ul.delivery-list li {
    margin-bottom: 5px;
}

ul.delivery-list.marker-list li:before {
    top: 1px;
    color: #000;
    font-size: 15px;
}

/* ========== FOOTER V2 STYLES ========== */

.footer-v2 {
    background: #2a2a2a;
    color: #b0b0b0;
    padding: 40px 0 30px;
}

.footer-v2__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-v2__col {
    min-width: 0;
}

.footer-v2__title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    position: relative;
    cursor: default;
}

.footer-v2__title:after {
    content: "";
    display: block;
    width: 50px;
    height: 2px;
    background-color: #e7110a;
    margin-top: 15px;
}

.footer-v2__menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-v2__menu li {
    margin-bottom: 10px;
}

.footer-v2__menu li:last-child {
    margin-bottom: 0;
}

.footer-v2__menu a {
    color: #b0b0b0;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-v2__menu a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Контакты */
.footer-v2__col--contacts {
    display: flex;
    flex-direction: column;
}

.footer-v2__contacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.footer-v2__phone {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-v2__phone:hover {
    color: #b0b0b0;
}

.footer-v2__telegram {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-v2__telegram:hover {
    color: #b0b0b0;
}

.footer-v2__telegram img {
    flex-shrink: 0;
}

.footer-v2__email {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-v2__email:hover {
    color: #b0b0b0;
}

.footer-v2__politics {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
}

.footer-v2__politics a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-v2__politics a:hover {
    color: #b0b0b0;
}

/* Нижняя часть */
.footer-v2__bottom {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid #444;
}

.footer-v2__disclaimer {
    color: #888;
    font-size: 12px;
    line-height: 1.6;
    margin: 0 0 20px;
}

.footer-v2__copyright {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 15px;
    font-size: 13px;
}

.footer-v2__copyright span {
    color: #b0b0b0;
    text-align: left;
}

.footer-v2__dev {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.2s ease;
    text-align: center;
}

.footer-v2__dev:hover {
    color: #fff;
}

/* Адаптив */
@media (max-width: 991px) {
    .footer-v2__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 639px) {
    .footer-v2 {
        padding: 30px 0 20px;
    }

    .footer-v2__grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .footer-v2__title {
        margin-bottom: 15px;
        cursor: pointer;
    }

    .footer-v2__title:before {
        content: "";
        display: block;
        background-image: url(/bitrix/templates/medver2016/img/icons/menu-arrow-down.svg);
        background-repeat: no-repeat;
        background-size: 10px;
        background-position: center;
        width: 20px;
        height: 20px;
        float: right;
        cursor: pointer;
        transition: transform 0.3s ease;
    }

    .footer-v2__title.is-open:before {
        transform: rotate(180deg);
    }

    .footer-v2__menu,
    .footer-v2__contacts,
    .footer-v2__politics {
        display: none;
    }

    .footer-v2__col.is-open .footer-v2__menu,
    .footer-v2__col.is-open .footer-v2__contacts,
    .footer-v2__col.is-open .footer-v2__politics {
        display: flex;
    }

    .footer-v2__col.is-open .footer-v2__menu {
        display: block;
    }

    .footer-v2__copyright {
        flex-direction: column;
        grid-template-columns: 1fr;
        align-items: center;
        justify-items: center;
    }
}

.sale-link {
    display: block;
    margin-top: 20px;
}

.sale-link a {
    text-decoration: none!important;
}

/* ========== WISHLIST (ИЗБРАННОЕ) STYLES ========== */

/* Иконка избранного в шапке (десктоп) */
.header-wishlist {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
}

.header-wishlist__link {
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
}

.header-wishlist__icon {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 32px;
}

.header-wishlist__icon img {
    width: 32px;
    height: 32px;
}

.header-wishlist__count {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background-color: #ff0405;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
    padding: 0 4px;
}

.header-wishlist__count:empty,
.header-wishlist__count[data-count="0"] {
    display: none;
}

/* Мобильное избранное в шапке */
.header-wishlist--mobile {
    display: none;
}

@media (max-width: 767px) {
    .header-wishlist--mobile {
        display: block;
        position: absolute;
        right: 70px;
        top: 34%;
        transform: translateY(-50%);
    }

    .header-wishlist--mobile .header-wishlist__link {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
    }

    .header-wishlist--mobile .header-wishlist__icon {
        position: relative;
        display: block;
        width: auto;
        height: auto;
    }

    .header-wishlist--mobile .header-wishlist__icon img {
        width: 30px;
        height: 30px;
    }

    .header-wishlist--mobile .header-wishlist__count {
        position: absolute;
        top: -5px;
        right: -5px;
        background: #ff0405;
        color: #fff;
        font-size: 11px;
        font-weight: 600;
        min-width: 18px;
        height: 18px;
        line-height: 18px;
        text-align: center;
        border-radius: 50%;
        padding: 0;
        box-sizing: border-box;
    }

    .header-wishlist--mobile .header-wishlist__count:empty,
    .header-wishlist--mobile .header-wishlist__count[data-count="0"] {
        display: none;
    }
}

/* Кнопка избранного на детальной странице товара */
.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.wishlist-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    text-decoration: none;
}

.wishlist-btn.in-wishlist {
    background: rgba(255, 255, 255, 1);
}

.wishlist-btn__icon {
    width: 30px;
    height: 30px;
    display: block;
}

/* Позиционируем detail-slider как relative для абсолютного позиционирования кнопки */
.detail-slider.detail-slider__vertical {
    position: relative;
}

/* Кнопка избранного в каталоге (список товаров) */
.wishlist-btn--catalog {
    width: 36px;
    height: 36px;
    top: 8px;
    left: 10px;
}

.wishlist-btn--catalog .wishlist-btn__icon {
    width: 22px;
    height: 22px;
}

.product-thumbnail-wrap {
    position: relative;
}

/* На мобилках сдвигаем лупу ниже, сердечко над ней */
@media (max-width: 767px) {
    .detail-slider .slick-track div a:after {
        top: 54px;
    }

    .wishlist-btn {
        top: 5px;
        right: 5px;
        width: 38px;
        height: 38px;
    }

    .wishlist-btn__icon {
        width: 24px;
        height: 24px;
    }
}

/* ========== WISHLIST PAGE STYLES ========== */

.wishlist-page {
    padding: 20px 0 40px;
}

.wishlist-page h1 {
    margin-bottom: 25px;
}

.wishlist-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.wishlist-item {
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.wishlist-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.wishlist-item__image {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    padding: 15px;
}

.wishlist-item__image a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.wishlist-item__image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.wishlist-item__content {
    padding: 15px;
    flex: 1;
}

.wishlist-item__name {
    margin-bottom: 8px;
}

.wishlist-item__name a {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wishlist-item__name a:hover {
    color: #ff0405;
}

.wishlist-item__price {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.wishlist-item__actions {
    padding: 0 15px 15px;
}

.wishlist-item__remove {
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    color: #999;
    width: 100%;
    transition: all 0.2s;
}

.wishlist-item__remove:hover {
    color: #ff0405;
    border-color: #ff0405;
}

@media (max-width: 576px) {
    .wishlist-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .wishlist-item__image {
        height: 150px;
        padding: 10px;
    }

    .wishlist-item__content {
        padding: 10px;
    }

    .wishlist-item__name a {
        font-size: 13px;
    }

    .wishlist-item__price {
        font-size: 14px;
    }

    .wishlist-item__actions {
        padding: 0 10px 10px;
    }
}

/* ========== PORTFOLIO GALLERY TOGGLE ========== */

.portfolio-gallery-block {
    margin-bottom: 50px;
}

.portfolio-gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
}

.portfolio-gallery-grid .img-grid-item {
    float: none;
    margin-right: 0;
    margin-bottom: 0;
}

.portfolio-gallery-grid--fixed-columns .img-grid-item {
    width: var(--portfolio-gallery-item-width) !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
}

@media (max-width: 959px) {
    .portfolio-gallery-grid--fixed-columns .img-grid-item {
        width: calc(25% - 7.5px) !important;
    }
}

@media (max-width: 639px) {
    .portfolio-gallery-grid--fixed-columns .img-grid-item {
        width: calc(50% - 5px) !important;
    }
}

.portfolio-gallery-block:not(.is-expanded) .img-grid-item.is-hidden-initial {
    display: none;
}

.portfolio-gallery-toggle {
    display: block;
    text-align: center;
    color: #ff0405;
    font-family: FiraSans, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.portfolio-gallery-toggle:hover,
.portfolio-gallery-toggle:focus {
    color: #303030;
    text-decoration: none;
}

.portfolio-video-block {
    margin-bottom: 50px;
}

.portfolio-video-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.portfolio-video-item {
    position: relative;
    padding-top: 56.25%;
    background: #000;
    overflow: hidden;
    height: 200px;
}

.portfolio-video-item iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 1199px) {
    .portfolio-video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 639px) {
    .portfolio-video-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.fixed-top .header-row {
    justify-content: space-between;
}

.main-section .main-content-title {
    text-transform: none;
}

.grey-row-faq {
    position: relative;
    padding: 50px 0;
    margin: 30px 0;
    z-index: 0;
}

.grey-row-faq::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 99.4vw;
    left: calc((100vw - 100%) / -2);
    right: calc((100vw - 100%) / -2);
    background-color: #f3f3f3;
    z-index: -1;
}