/* arte 31.10.2026 — мобильная вёрстка (аудит 31.10, скриншоты 360 px). Только телефоны и узкие планшеты;
   на ПК (≥ 768 px) этот файл ничего не меняет. */

/* Цена в карточке каталога не разрывается на «5 400 / руб.» (старая и новая — каждая в одну строку) */
.productItem-priceNew,
.productItem-priceOld {
    white-space: nowrap;
}
.productItem-price:not(:has(.productItem-priceNew)),
.slider-price {
    white-space: nowrap;
}

@media (max-width: 767px) {

    /* Цены в каталоге: старая и новая — в одну строку, кнопка корзины не наезжает */
    .productItem-buy-box {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 4px;
    }
    .productItem-buy-box .productItem-price,
    .productItem-buy-box .productItem-priceNew {
        font-size: 15px;
        line-height: 1.2;
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
        overflow: visible;
    }
    .productItem-buy-box .productItem-priceOld,
    .productItem-buy-box .productItem-priceNew {
        display: block;
    }
    .productItem-buy-box .productItem-buy {
        flex: 0 0 auto;
    }
    .productItem-buy-box .productItem-priceOld {
        font-size: 12px;
        line-height: 1.2;
    }

    /* Описание товара — по левому краю (по ширине на узком экране давало «дыры» между словами) */
    .tab-inner p,
    .product-info-description,
    .product-info-description p {
        text-align: left;
    }

    /* Серые квадратные стрелки слайдеров («Новинки», «Распродажа», рекомендации в корзине) поверх фото:
       меньше и полупрозрачные; листать можно пальцем */
    .product-slider-control.slick-arrow {
        opacity: .55;
        transform: scale(.7);
        transform-origin: center;
    }
    .product-slider-control.slick-arrow:active {
        opacity: .9;
    }
}

/* ===== Корзина: кнопки «−/+» у количества =====
   В разметке они были (setQuantity), но без единого стиля — пустые ссылки 0×0, не видны ни на телефоне, ни на ПК. */
.cart-table-count .add-product {
    display: inline-flex;
    align-items: stretch;
    vertical-align: middle;
}
.cart-table-count .add-product input {
    order: 2;
    width: 44px;
    height: 34px;
    margin: 0;
    padding: 0 2px;
    text-align: center;
    border: 1px solid #ccc;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-sizing: border-box;
}
.cart-table-count #basket_quantity_control {
    display: contents;
}
.cart-table-count #basket_quantity_control a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    color: #333;
    font: 500 20px/1 Arial, sans-serif;
    text-decoration: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}
.cart-table-count #basket_quantity_control a:active { background: #e6e6e6; }
.cart-table-count #basket_quantity_control a.minus { order: 1; border-radius: 4px 0 0 4px; }
.cart-table-count #basket_quantity_control a.plus  { order: 3; border-radius: 0 4px 4px 0; }
.cart-table-count #basket_quantity_control a.minus::before { content: "\2212"; }
.cart-table-count #basket_quantity_control a.plus::before  { content: "+"; }

@media (max-width: 767px) {
    /* «Оформить» прилипает к низу экрана, пока покупатель листает корзину */
    .cart-page .cart-buttons {
        position: -webkit-sticky;
        position: sticky;
        bottom: 0;
        z-index: 60;
        background: #fff;
        padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -6px 12px -8px rgba(0,0,0,.25);
    }
    .cart-page .cart-buttons .btn-continue {
        display: block;
        width: 100%;
        font-size: 18px;
    }
    /* «Удалить все товары» — не под рукой рядом с «Применить», а скромно и с отступом */
    .cart-page .cart-summary-trash {
        margin-top: 18px;
        font-size: 12px;
        opacity: .65;
    }
    .cart-page .cart-summary-trash img { width: 16px; height: auto; }
    /* Оформление: «ИТОГО К ОПЛАТЕ» не огромным шрифтом и сумма в одну строку */
    .cart-page tr.total td {
        font-size: 17px !important;
        line-height: 1.25 !important;
    }
    .cart-page tr.total td + td,
    #total-overall, #total-products-price, #total-delivery {
        white-space: nowrap;
    }
    /* Окно «Ваш город?» в корзине и на оформлении не закрывает форму (город вводится в поле «Населённый пункт») */
    .cart-page .tfl-define-popup {
        display: none !important;
    }
}
