.header__search.d-sm-block {
    padding: 10px;
    background-color: #383e45;
    margin-top: -16px;
    margin-bottom: 16px;
}

.btn.--white {
    display: inline-block;
    padding: 19px 20px;
    color: #383e45 !important;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 125%;
    border: solid 1px #383e45;
    text-decoration: none;
    border-radius: 5px;
}

.btn.--white:hover {
    color: #fff !important;
    background-color: #ae824e;
    border-color: #ae824e;
}

/* Универсальный попап */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.popup-overlay.--active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    transition: all 0.3s ease;
    z-index: 10000;
    cursor: default;
}

.popup-overlay.--active .popup-content {
    transform: translate(-50%, -50%) scale(1);
}

.popup-content__title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #383e45;
}

.popup-content__text {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 30px;
    color: #666;
}

.popup-content__buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.popup-content__button {
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popup-content__button.--primary {
    background: #ae824e;
    color: #fff;
    border: none;
}

.popup-content__button.--primary:hover {
    background: #966f3d;
}

.popup-content__button.--secondary {
    background: transparent;
    color: #383e45;
    border: 1px solid #383e45;
}

.popup-content__button.--secondary:hover {
    background: #383e45;
    color: #fff;
}

/* Специфичные стили для 18+ */
.popup-content.--adult {
    background: #fff;
    border: 2px solid #ae824e;
}

.popup-content.--adult .popup-content__title {
    color: #ae824e;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* .popup-content.--adult .popup-content__title::before {
    content: '18+';
    background: #ae824e;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 18px;
    font-weight: 700;
} */

.popup-content.--adult .popup-content__button.--primary {
    background: #ae824e;
}

.popup-content.--adult .popup-content__button.--primary:hover {
    background: #966f3d;
}

/* Стили для успешных попапов */
.popup-content.--success {
    border-left: 4px solid #8c6d54;
}

.popup-content.--success .popup-content__title {
    color: #8c6d54;
}

.popup-content.--success .popup-content__button.--primary {
    background: #8c6d54;
    border-color: #8c6d54;
}

.popup-content.--success .popup-content__button.--primary:hover {
    background: #6b5441;
    border-color: #6b5441;
}

/* Стили для ошибочных попапов */
.popup-content.--error {
    border-left: 4px solid #f44336;
}

.popup-content.--error .popup-content__title {
    color: #c62828;
}

.popup-content.--error .popup-content__button.--primary {
    background: #f44336;
    border-color: #f44336;
}

.popup-content.--error .popup-content__button.--primary:hover {
    background: #d32f2f;
    border-color: #d32f2f;
}

/* Выделенеие атвора в результатах search.title */
.header__search-results .is-author {
    color: #ae824e;
    font-weight: 700;
    border-bottom: 1px dashed #ae824e;
}

/* Стили для анимации хедера на мобильных */
@media (max-width: 767px) {
    .frontend .main {
        padding-top: 60px !important;
    }

    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        transition: transform 0.3s ease-in-out;
    }

    .header.--hidden {
        transform: translateY(-100%);
    }

    body {
        padding-top: 56px;
        /* Высота хедера */
    }

    .header__bottom {
        flex-direction: column;
        padding: 20px 0;
    }

    .header_two_links {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 20px;
        width: 100%;
        margin: 0 0 30px;
        order: -1;
    }

    .header__nav {
        width: 100%;
        margin-top: 20px;
        display: flex;
        flex-direction: column;
    }

    .header__nav li {
        width: 90%;
        margin: 5px auto;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .header__nav li:hover {
        background: rgba(174, 130, 78, 0.2);
        border-color: rgba(174, 130, 78, 0.3);
    }

    .header__nav li a {
        display: block;
        width: 100%;
        padding: 16px;
        font-size: 16px;
        text-align: center;
        color: #fff;
        text-decoration: none;
        transition: all 0.3s ease;
    }

    .header__nav li:active {
        transform: scale(0.98);
        background: rgba(174, 130, 78, 0.3);
    }

    .header__nav-item:last-child {
        margin: 5px auto;
    }

    /* Вертикальное расположение элементов в блоке цены */
    .randombook__content-item .content-item__info-price {
        display: flex !important;
        flex-direction: column !important;
    }

    .randombook__content-item .content-item__info-price-group {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
    }

    .randombook__content-item .content-item__info-price .info-price__more,
    .randombook__content-item .content-item__info-price .info-price__again {
        margin: 10px 0;
        width: 80%;
    }
}

.frontend .products-list__item-picture .item-picture__wrap picture,
.frontend .products-list__item-picture .item-picture__wrap img {
    width: 100%;
}

.catalog-product__picture .product-picture__slides-item {
    min-height: 135px;
}

.catalog-product__picture .product-picture__slides-item picture,
.catalog-product__picture .product-picture__slides-item img {
    width: 100%;
}

.product-picture__photo picture img {
    width: 450px;
}

@media (max-width: 767px) {
    .product-picture__photo picture img {
        width: 100%;
    }
}

.footer__column {
    padding: 40px 20px !important;
}

/* Кнопка покупки на нашем сайте */
.buy-block__own {
    flex: 1;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 125%;
    margin-right: 24px;
    display: inline-block;
    color: #fff !important;
    padding: 20px;
    text-decoration: none;
    border-radius: 5px;
    background: #b08968;
    text-align: center;
    min-width: 212px;
}

.buy-block__own:hover {
    background: #8c6d54;
    color: #fff !important;
}

.header__cart {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #f4f4f4;
    text-decoration: none;
    margin-right: 30px;
    position: relative;
}

@media (max-width: 767px) {
    .header__cart {
        top: -14px;
        left: 20px;
    }

    .header__cart .header__cart-counter {
        right: -4px;
    }

    .header__cart .header__cart-text {
        display: none;
    }
}

.header__cart-icon {
    display: block;
    width: 28px;
    height: 28px;
    margin-top: 4px;
    background: url("data:image/svg+xml,%3Csvg width='26' height='23' viewBox='0 0 26 23' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.77441 19.1671C10.8538 19.1671 11.7293 20.0247 11.7295 21.0831C11.7295 22.1417 10.8539 23.0001 9.77441 23.0001C8.69515 22.9999 7.82031 22.1415 7.82031 21.0831C7.82048 20.0249 8.69526 19.1674 9.77441 19.1671ZM19.5439 19.1671C20.6233 19.1671 21.4989 20.0247 21.499 21.0831C21.499 22.1417 20.6234 23.0001 19.5439 23.0001C18.4647 22.9999 17.5898 22.1415 17.5898 21.0831C17.59 20.0249 18.4648 19.1674 19.5439 19.1671ZM22.0557 0.00793457C24.704 0.167039 26.5622 2.75617 25.8076 5.34583L24.7705 8.90344L24.6934 9.15247C23.8661 11.6095 21.606 13.3044 19.0156 13.4113L18.7559 13.4171H9.47754L9.28418 13.4122C8.65691 13.3835 8.06348 13.2134 7.53418 12.9347C6.46642 14.0671 7.15813 16.2059 8.97754 16.2062H23.4551V18.2941H8.97754C5.20884 18.2938 3.77209 13.8646 5.97949 11.5167C5.69132 11.0746 5.48053 10.5748 5.37598 10.0323L5.34375 9.84192L4.18945 1.91711H0V0.00012207H21.7969L22.0557 0.00793457ZM7.41113 9.54114C7.56083 10.5673 8.44051 11.3282 9.47754 11.3282H18.7559C20.6126 11.328 22.2462 10.1021 22.7656 8.31946L23.8027 4.76184L23.835 4.63586C24.1287 3.34248 23.1454 2.08899 21.7969 2.08899H6.3252L7.41113 9.54114Z' fill='%23F4F7FA'/%3E%3C/svg%3E") no-repeat
}

.header__cart-text {
    color: #f4f4f4;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-align: center
}

.header__cart:hover {
    color: #ae824e
}

.header__cart:hover .header__cart-icon {
    color: red;
    background: url("data:image/svg+xml,%3Csvg width='26' height='23' viewBox='0 0 26 23' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.77441 19.1671C10.8538 19.1671 11.7293 20.0247 11.7295 21.0831C11.7295 22.1417 10.8539 23.0001 9.77441 23.0001C8.69515 22.9999 7.82031 22.1415 7.82031 21.0831C7.82048 20.0249 8.69526 19.1674 9.77441 19.1671ZM19.5439 19.1671C20.6233 19.1671 21.4989 20.0247 21.499 21.0831C21.499 22.1417 20.6234 23.0001 19.5439 23.0001C18.4647 22.9999 17.5898 22.1415 17.5898 21.0831C17.59 20.0249 18.4648 19.1674 19.5439 19.1671ZM22.0557 0.00793457C24.704 0.167039 26.5622 2.75617 25.8076 5.34583L24.7705 8.90344L24.6934 9.15247C23.8661 11.6095 21.606 13.3044 19.0156 13.4113L18.7559 13.4171H9.47754L9.28418 13.4122C8.65691 13.3835 8.06348 13.2134 7.53418 12.9347C6.46642 14.0671 7.15813 16.2059 8.97754 16.2062H23.4551V18.2941H8.97754C5.20884 18.2938 3.77209 13.8646 5.97949 11.5167C5.69132 11.0746 5.48053 10.5748 5.37598 10.0323L5.34375 9.84192L4.18945 1.91711H0V0.00012207H21.7969L22.0557 0.00793457ZM7.41113 9.54114C7.56083 10.5673 8.44051 11.3282 9.47754 11.3282H18.7559C20.6126 11.328 22.2462 10.1021 22.7656 8.31946L23.8027 4.76184L23.835 4.63586C24.1287 3.34248 23.1454 2.08899 21.7969 2.08899H6.3252L7.41113 9.54114Z' fill='%23ae824e'/%3E%3C/svg%3E") no-repeat
}

.header__cart:hover .header__cart-text {
    color: #ae824e
}

/* Стили для счетчика товаров в корзине */
.header__cart-counter {
    position: absolute;
    top: -8px;
    right: 8px;
    background: #d32f2f;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    min-width: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header__cart-counter.--large {
    font-size: 10px;
    width: 22px;
    height: 22px;
    min-width: 22px;
}

/* Анимация обновления счетчика */
.header__cart-counter.--updating {
    animation: counterUpdate 0.3s ease-in-out;
}

@keyframes counterUpdate {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
        background: #ff5722;
    }

    100% {
        transform: scale(1);
    }
}

/* Анимация появления и обновления счетчика */
.header__cart-counter {
    transition: all 0.2s ease-in-out;
}

@keyframes counterAppear {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.buy-block__avito.--loading {
    animation: avito-pulse 0.7s infinite;
    pointer-events: none;
    opacity: 0.7;
}

@keyframes avito-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

.buy-block__avito.--success {
    animation: avito-success 0.5s;
    background: #4caf50 !important;
    color: #fff !important;
}

@keyframes avito-success {
    0% {
        box-shadow: 0 0 0 0 #4caf5077;
    }

    70% {
        box-shadow: 0 0 8px 8px #4caf5077;
    }

    100% {
        box-shadow: 0 0 0 0 #4caf5000;
    }
}

.buy-block__avito.--error {
    animation: avito-error 0.5s;
    background: #d32f2f !important;
    color: #fff !important;
}

@keyframes avito-error {
    0% {
        box-shadow: 0 0 0 0 #d32f2f77;
    }

    70% {
        box-shadow: 0 0 8px 8px #d32f2f77;
    }

    100% {
        box-shadow: 0 0 0 0 #d32f2f00;
    }
}