span.aws_result_price {
    color: red !important;
}

.woocommerce a.remove {
    width: 30px !important;
    height: 30px !important;
    padding: 3px 0 0 0 !important;
}

input.text-center.quantity-input.text-dark {
    width: 50%;
}

.woocommerce-breadcrumb {
    padding-top: 20px !important;
}

.woocommerce .quantity .qty {
    width: 5em !important;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-cube {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.category-cube:hover {
    transform: translateY(-5px);
    border-color: var(--color-main);
    background: #f8f9fa;
}

.cube-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.cube-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e9ecef;
}

.cube-icon img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.cube-name {
    color: #333;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
}

/* Планшеты */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        padding: 15px;
    }
}

/* Мобильная версия с горизонтальным скроллом */
@media (max-width: 768px) {
    .categories-grid {
        display: flex;
        overflow-x: auto;
        gap: 12px;
        padding: 15px;
        scrollbar-width: thin;
        scrollbar-color: var(--color-main) transparent;
        -webkit-overflow-scrolling: touch;
        grid-template-columns: unset;
    }

    .categories-grid::-webkit-scrollbar {
        height: 4px;
    }

    .categories-grid::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 2px;
    }

    .categories-grid::-webkit-scrollbar-thumb {
        background: var(--color-main);
        border-radius: 2px;
    }

    .category-cube {
        flex: 0 0 auto;
        width: 120px;
        min-width: 120px;
        padding: 20px 10px;
    }

    .cube-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 12px;
    }

    .cube-icon img {
        width: 30px;
        height: 30px;
    }

    .cube-name {
        font-size: 13px;
    }
}

/* Маленькие мобильные */
@media (max-width: 480px) {

    .d-mob-flex.container.navbar.navbar-expand-lg.navbar-light.px-4.bg-white {
        flex-wrap: nowrap;
        padding-left: 5px !important;
        padding-right: 5px !important;
        justify-content: space-evenly;
    }

    .h60 {
        height: 35px !important;
    }

    .categories-grid {
        gap: 10px;
        padding: 12px;
    }

    .category-cube {
        width: 150px;
        min-width: 110px;
        padding: 18px 8px;
    }

    .cube-icon {
        width: 55px;
        height: 55px;
    }

    .cube-icon img {
        width: 28px;
        height: 28px;
    }

    .cube-name {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .woocommerce-notices-wrapper {
        margin-top: 35px;
    }

    /* Скрываем заголовок таблицы */
    .woocommerce-cart-form__contents thead {
        display: none !important;
    }

    .woocommerce a.remove {
        margin-left: 15px;
    }

    /* Каждый товар - отдельный блок */
    .woocommerce-cart-form__cart-item {
        display: block !important;
        width: 100% !important;
        margin-bottom: 20px !important;
        padding: 15px !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 10px !important;
        background: white !important;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08) !important;
        position: relative !important;
    }

    /* Сбрасываем ячейки таблицы в блоки */
    .woocommerce-cart-form__cart-item td {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        border: none !important;
        text-align: left !important;
        float: none !important;
        clear: both !important;
    }

    /* ========= ПЕРВАЯ СТРОКА: КАРТИНКА И УДАЛЕНИЕ ========= */
    .product-remove {
        position: absolute !important;
        top: 10px !important;
        right: 10px !important;
        width: auto !important;
        z-index: 10 !important;
    }

    .product-remove .remove {
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #ff4444 !important;
        color: white !important;
        border-radius: 50% !important;
        font-size: 18px !important;
    }

    .product-remove .remove:hover {
        background: #cc0000 !important;
    }

    .product-thumbnail {
        display: flex !important;
        justify-content: center !important;
        margin-bottom: 12px !important;
        padding-top: 5px !important;
    }

    .product-thumbnail a {
        display: inline-block !important;
    }

    .product-thumbnail img {
        width: 140px !important;
        height: 140px !important;
        object-fit: contain !important;
        border-radius: 8px !important;
        border: 1px solid #eee !important;
        background: #f9f9f9 !important;
        padding: 5px !important;
    }

    /* ========= ВТОРАЯ СТРОКА: НАЗВАНИЕ ========= */
    .product-name {
        margin-bottom: 20px !important;
        text-align: center !important;
        padding: 0 5px !important;
    }

    .product-name h6 {
        font-size: 16px !important;
        line-height: 1.4 !important;
        margin: 0 !important;
        font-weight: 600 !important;
        color: #333 !important;
    }

    .product-name a {
        color: #333 !important;
        text-decoration: none !important;
    }

    .product-name a:hover {
        color: #1976d2 !important;
        text-decoration: underline !important;
    }

    /* ========= ТРЕТЬЯ СТРОКА: ВСЕ ОСТАЛЬНОЕ ========= */
    /* Сетка для цен, количества и итога */
    .product-price,
    .product-quantity,
    .product-subtotal {
        display: inline-block !important;
        vertical-align: top !important;
        margin-bottom: 15px !important;
        box-sizing: border-box !important;
    }

    /* Цена - слева */
    .product-price {
        width: 30% !important;
        padding-right: 10px !important;
        text-align: center !important;
    }

    .product-price .price {
        display: block !important;
        font-size: 18px !important;
        font-weight: 700 !important;
        color: #e53935 !important;
        margin-top: 3px !important;
    }

    .product-price:before {
        content: "Цена" !important;
        display: block !important;
        font-size: 13px !important;
        color: #666 !important;
        margin-bottom: 5px !important;
        font-weight: 500 !important;
    }

    /* Количество - центр */
    .product-quantity {
        width: 40% !important;
        padding: 0 5px !important;
        text-align: center !important;
    }

    .product-quantity .quantity-wrapper {
        max-width: 100% !important;
        margin: 0 auto !important;
    }

    /* Стилизация поля количества с стрелками */
    .product-quantity input[type="number"] {
        width: 100% !important;
        height: 48px !important;
        text-align: center !important;
        font-size: 17px !important;
        font-weight: 600 !important;
        border: 2px solid #1976d2 !important;
        border-radius: 8px !important;
        background: #f8fdff !important;
        color: #333 !important;
        padding: 0 10px !important;
        -moz-appearance: textfield !important;
    }

    /* Стрелки для WebKit браузеров (Chrome, Safari) */
    .product-quantity input[type="number"]::-webkit-inner-spin-button,
    .product-quantity input[type="number"]::-webkit-outer-spin-button {
        -webkit-appearance: inner-spin-button !important;
        opacity: 1 !important;
        height: 48px !important;
        width: 24px !important;
        background: #1976d2 !important;
        border-radius: 0 4px 4px 0 !important;
        position: relative !important;
        right: -5px !important;
    }

    /* Для Firefox */
    .product-quantity input[type="number"] {
        -moz-appearance: textfield !important;
    }

    .product-quantity input[type="number"]:hover,
    .product-quantity input[type="number"]:focus {
        border-color: #1565c0 !important;
        background: #fff !important;
        outline: none !important;
        box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1) !important;
    }

    .product-quantity:before {
        content: "Количество" !important;
        display: block !important;
        font-size: 13px !important;
        color: #666 !important;
        margin-bottom: 8px !important;
        font-weight: 500 !important;
    }

    /* Итого - справа */
    .product-subtotal {
        width: 30% !important;
        padding-left: 10px !important;
        text-align: center !important;
    }

    .product-subtotal .subtotal {
        display: block !important;
        font-size: 19px !important;
        font-weight: 700 !important;
        color: #2e7d32 !important;
        margin-top: 3px !important;
    }

    .product-subtotal:before {
        content: "Итого" !important;
        display: block !important;
        font-size: 13px !important;
        color: #666 !important;
        margin-bottom: 5px !important;
        font-weight: 500 !important;
    }

    /* Информация о минимальном заказе */
    .product-quantity:after {
        content: "Мин. заказ: 50 шт." !important;
        display: block !important;
        font-size: 12px !important;
        color: #666 !important;
        margin-top: 8px !important;
        padding: 4px 8px !important;
        background: #fff8e1 !important;
        border-radius: 6px !important;
        border: 1px dashed #ffb300 !important;
        font-weight: 500 !important;
    }

    /* ========= КНОПКА ОБНОВЛЕНИЯ КОРЗИНЫ ========= */
    .actions {
        padding-top: 25px !important;
        margin-top: 10px !important;
        border-top: 2px dashed #e0e0e0 !important;
    }

    .actions>td {
        padding: 0 !important;
    }

    .actions .d-flex {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .actions button {
        width: 100% !important;
        padding: 16px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        background: linear-gradient(135deg, #1976d2, #1565c0) !important;
        color: white !important;
        border: none !important;
        border-radius: 10px !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }

    .actions button:not(:disabled):hover {
        background: linear-gradient(135deg, #1565c0, #0d47a1) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3) !important;
    }

    .actions button:disabled {
        opacity: 0.5 !important;
        cursor: not-allowed !important;
        background: #bdbdbd !important;
    }

    /* Улучшаем контейнер таблицы */
    .table.woocommerce-cart-form__contents {
        background: transparent !important;
        border: none !important;
    }

    .woocommerce-cart-form__contents tbody {
        display: block !important;
    }
}

/* Для очень маленьких экранов (до 360px) */
@media (max-width: 360px) {

    .product-price,
    .product-quantity,
    .product-subtotal {
        width: 100% !important;
        display: block !important;
        margin-bottom: 20px !important;
        padding: 0 !important;
    }

    .product-price .price {
        font-size: 20px !important;
    }

    .product-subtotal .subtotal {
        font-size: 21px !important;
    }

    .product-quantity input[type="number"] {
        height: 52px !important;
        font-size: 18px !important;
    }

    .product-thumbnail img {
        width: 120px !important;
        height: 120px !important;
    }
}

/* Для средних экранов (от 481px до 767px) */
@media (min-width: 481px) and (max-width: 767px) {

    /* Слегка уменьшаем отступы, но сохраняем структуру */
    .woocommerce-cart-form__cart-item td {
        padding: 8px 4px !important;
    }

    .product-name h6 {
        font-size: 15px !important;
    }

    .product-price .price,
    .product-subtotal .subtotal {
        font-size: 16px !important;
    }

    .product-quantity input[type="number"] {
        width: 80px !important;
        height: 42px !important;
    }
}

.htel {
    color: #212529;
    text-decoration: none;
}