/* ==========================================================
   EVO SHOP / InSale 4.5.2
   Каталог, страница товара, склады, доставка DP
   Полная замена предыдущего пользовательского CSS
   ========================================================== */

/* 1. КАТАЛОГ: 4 КАРТОЧКИ В РЯД */

@media (min-width: 900px) {

    .products.products_col-4 .products__item {
        display: flex;
        flex-direction: column;
    }

    .products.products_col-4 .products__item > a {
        flex-grow: 1 !important;
    }

    .products.products_col-4 .products__item-info {
        min-height: 0 !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    .products.products_col-4 .products__item-info-name {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        font-size: 14px !important;
        font-weight: 600;
        line-height: 1.4;
    }

    .products.products_col-4 .products__bottom {
        margin-top: 0 !important;
        padding-top: 0 !important;
        flex-shrink: 0;
    }

    .products.products_col-4 .products__addtocart {
        height: auto !important;
        min-height: 0 !important;
    }

    .products.products_col-4 .products__available {
        margin: 0 0 5px !important;
        padding: 0 !important;
    }

    .products.products_col-4 .products__price {
        margin: 0 !important;
        padding: 0 !important;
    }

    .products.products_col-4 .products__price-new {
        color: #1d1d1f;
        font-size: 20px !important;
        font-weight: 700;
        line-height: 1.2;
    }

    .products.products_col-4 .products__cart {
        margin-top: 8px !important;
        padding-top: 0 !important;
    }

    .products.products_col-4 .products__cart-flex {
        display: flex;
        align-items: center;
        gap: 7px;
    }

    .products.products_col-4 .products__button {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 38px;
        border-radius: 18px !important;
        background: #0071e3;
        color: #fff;
        font-size: 13px !important;
        font-weight: 600;
    }

    .products.products_col-4 .products__button:hover {
        background: #005bb5;
    }

    .products.products_col-4 .products__vfc {
        flex: 0 0 auto;
    }
}

/* Пустые серые звёзды скрываются,
   реальные оценки остаются */

.products .products__item-info-rating:not(:has(.products__rating i.star, .products__rating-count)) {
    display: none !important;
}


/* ==========================================================
   2. КАРТОЧКА ТОВАРА
   ========================================================== */

.product .product__h1 {
    color: #1d1d1f;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.product .product__features-item {
    padding-top: 5px;
    padding-bottom: 5px;
    line-height: 1.5;
}

.product .product__features-name {
    color: #6e6e73;
    font-size: 12px;
}

.product .product__features-value {
    color: #1d1d1f;
    font-size: 12px;
    font-weight: 500;
}

.product .product__features-all {
    color: #0071e3;
    font-weight: 600;
    cursor: pointer;
}


/* Панель покупки */

.product #cart-form .product__content-right {
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.045);
}

.product .product__content-right .product__code {
    color: #86868b;
    font-size: 11px;
    line-height: 1.5;
}

.product .product__content-right .product__price {
    color: #1d1d1f;
    font-size: 28px !important;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.product .product__content-right .product__price-old {
    color: #86868b;
    font-size: 13px;
    font-weight: 400;
}

.product .product__price-dis-percent {
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.product .product__price-dis-number {
    font-size: 11px;
}

.product .product__content-right .counter {
    border-radius: 10px;
}

.product .product__content-right .counter button {
    cursor: pointer;
}

.product #cart-form .product__button {
    width: 100%;
    min-height: 44px;
    border-radius: 14px !important;
    background: #0071e3 !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.product #cart-form .product__button:hover {
    background: #005bb5 !important;
}

.product #cart-form .product__button:focus-visible {
    outline: 2px solid #0071e3;
    outline-offset: 3px;
}


/* ==========================================================
   3. ПЛАГИН СКЛАДОВ
   ========================================================== */

.product .product__content-right .stocks {
    max-width: 100%;
    box-sizing: border-box;
}

/* Плагин использует нестандартные
   вложенные элементы <text> */

.product .product__content-right .stocks > div > text {
    display: block !important;
    box-sizing: border-box;
    width: 100%;
    padding: 8px 10px !important;
    margin: 0 0 6px !important;
    border: 1px solid #ececef;
    border-radius: 10px;
    background: #f5f5f7;
    color: #1d1d1f !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
}

.product .product__content-right .stocks > div > text > text:first-child {
    color: #6e6e73 !important;
    font-weight: 600;
}


/* ==========================================================
   4. ДОСТАВКА DP: ГОРОД, СЛУЖБЫ И СТОИМОСТЬ
   ========================================================== */

.product .product__content-right .dp-product {
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid #e5e5e7;
    border-radius: 14px;
    background: #fff;
}

.product .dp-product__header {
    padding: 12px 14px !important;
    border-radius: 13px 13px 0 0;
    background: #f5f5f7;
    color: #1d1d1f;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
}


/* «Доставка: Москва» в одну строку */

.product .dp-product__header > div[align="center"] {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 4px;
    text-align: left !important;
}

.product .dp-product__header br {
    display: none !important;
}

.product .dp-product__header .dp-container__city-select {
    display: inline-flex !important;
    align-items: center;
    width: auto;
    margin: 0 !important;
    padding: 0;
}

.product .dp-product__header .dp-container__city-select::before {
    content: ':';
    margin-right: 5px;
    color: #1d1d1f;
}

.product .dp-product__header .dp-city-select-link__city-link {
    display: inline-flex;
    align-items: center;
}

.product .dp-city-select-link__city-link,
.product .dp-city-select-link__city-text {
    color: #0071e3 !important;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
}

.product .dp-city-select-link__city-link:hover {
    color: #005bb5 !important;
    text-decoration: underline !important;
}


/* Содержимое блока доставки */

.product .dp-product__content {
    padding: 12px 14px !important;
}

.product .dp-product__group-title {
    margin-bottom: 8px;
    color: #1d1d1f;
    font-size: 12px;
    font-weight: 700;
}

/* Скрываем лишний заголовок
   для списка без групп */

.product .dp-product__service_without-groups > .dp-product__group-title {
    display: none;
}


/* Название перевозчика слева, цена справа */

.product .dp-product__service-row {
    display: grid !important;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    padding: 9px 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid #ececef;
}

.product .dp-product__service-row:last-child {
    border-bottom: 0;
}

.product .dp-product__service-row > .dp-product__service-title {
    width: auto;
    margin: 0 !important;
    padding: 0;
    color: #1d1d1f;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.product .dp-product__service-title_link {
    color: #0071e3 !important;
    font-weight: 600;
    text-decoration: none !important;
    border-bottom: none !important;
}

.product .dp-product__service-title_link:hover {
    color: #005bb5 !important;
    text-decoration: underline !important;
}


/* Контейнер расчёта стоимости */

.product .dp-product__service-calculation {
    min-width: 0;
    width: 100%;
    margin: 0 !important;
    padding: 0;
    text-align: right;
}

.product .dp-product__service-rates {
    margin: 0 !important;
    padding: 0 !important;
    text-align: right;
}

.product .dp-product__service-price {
    display: inline-block;
    margin: 0;
    color: #1d1d1f;
    font-size: 11px;
    line-height: 1.4;
    text-align: right;
}

.product .dp-product__service-calculation .dp-cost_range-value {
    white-space: nowrap;
}

.product .dp-product__service-calculation .dp-cost_range-value::before {
    display: none !important;
}

.product .dp-product__service-calculation .dp-cost__value {
    color: #1d1d1f;
    font-size: 11px;
    font-weight: 700;
}

.product .dp-product__service-calculation .dp-cost__caption {
    color: #86868b;
    font-size: 10px;
}


/* ==========================================================
   5. ДЕСКТОП: УВЕЛИЧЕННЫЙ БЛОК ДОСТАВКИ
   ========================================================== */

@media (min-width: 900px) {

    .product .dp-product {
        font-size: 13px;
    }

    /* Заголовок */
    .product .dp-product__header {
        padding: 14px 16px !important;
        font-size: 15px;
        line-height: 1.5;
    }

    /* Город */
    .product .dp-city-select-link__city-link,
    .product .dp-city-select-link__city-text {
        font-size: 14px !important;
    }

    /* Внутренние отступы */
    .product .dp-product__content {
        padding: 12px 16px !important;
    }

    /* Строки доставки */
    .product .dp-product__service-row {
        padding: 12px 0 !important;
        gap: 8px;
    }

    /* Названия компаний */
    .product .dp-product__service-row > .dp-product__service-title {
        font-size: 13px;
    }

    /* Стоимость */
    .product .dp-product__service-price {
        font-size: 13px;
        line-height: 1.6;
    }

    /* Цифры */
    .product .dp-product__service-calculation .dp-cost__value {
        font-size: 13px;
        font-weight: 700;
        white-space: nowrap;
    }

    /* Подписи «от» и «до» */
    .product .dp-product__service-calculation .dp-cost__caption {
        font-size: 11px;
    }

    /* Разрешаем перенос длинных диапазонов */
    .product .dp-product__service-calculation .dp-cost_range-value {
        white-space: normal;
    }
}


/* ==========================================================
   6. МОБИЛЬНАЯ КАРТОЧКА ТОВАРА
   ========================================================== */

@media (max-width: 767px) {

    /* Заголовок товара */
    .product .product__h1 {
        font-size: 22px;
        line-height: 1.3;
    }

    /* Панель покупки */
    .product #cart-form .product__content-right {
        border-radius: 14px;
    }

    /* Цена */
    .product .product__content-right .product__price {
        font-size: 26px !important;
    }

    /* Убираем отступ пустого блока SKU */
    .product .product__content-right > .product__item:has(> input[name="sku_id"]:only-child) {
        height: 0 !important;
        min-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
    }

    /* Цена → количество */
    .product .product__content-right > .product__cart {
        margin-top: 12px !important;
    }

    /* Количество → кнопка */
    .product .product__content-right .product__counter {
        margin-bottom: 12px !important;
    }

    /* Кнопка покупки */
    .product #cart-form .product__button {
        min-height: 48px;
    }

    /* Складские плашки */
    .product .product__content-right .stocks > div > text {
        padding: 9px 10px !important;
    }

    /* Отступы доставки */
    .product .dp-product__header,
    .product .dp-product__content {
        padding: 12px !important;
    }

    /* Строки доставки */
    .product .dp-product__service-row {
        gap: 5px;
    }

    /* Стоимость доставки */
    .product .dp-product__service-price {
        font-size: 12px;
        line-height: 1.5;
    }

    /* Перенос длинных тарифов */
    .product .dp-product__service-calculation .dp-cost_range-value {
        white-space: normal;
    }

    /* Цифры тарифов */
    .product .dp-product__service-calculation .dp-cost__value {
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
    }

    /* Подписи от / до */
    .product .dp-product__service-calculation .dp-cost__caption {
        font-size: 11px;
    }

    /* Раскрытие описания */
    .product .h-yet__show,
    .product .h-yet__hide {
        color: #0071e3;
        font-size: 14px;
        font-weight: 600;
        text-transform: capitalize;
    }
}


/* ==========================================
   EVO SHOP — ФИНАЛЬНОЕ ОФОРМЛЕНИЕ ПОДВАЛА
   ========================================== */

.footer .footer__item-logo {
    margin-bottom: 16px;
}

.footer .footer__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: #1d1d1f;
    border-radius: 12px;
    text-decoration: none;
}

.footer .footer__logo img {
    display: block;
    max-width: 180px;
    height: auto;
}

@media (max-width: 767px) {
    .footer .footer__logo {
        padding: 10px 14px;
        border-radius: 10px;
    }

    .footer .footer__logo img {
        max-width: 155px;
    }
}


/* EVO SHOP — названия категорий без CAPS LOCK */

.header__bott-categories
.h-menu > .h-menu__item > .h-menu__link > .h-menu__name {
    text-transform: none !important;
}
