/*
Theme Name: СтройРент Тема
Description: Кастомная тема для аренды оборудования
Author: Ваше Имя
Version: 1.0
*/
/* =========================================================
   СОВРЕМЕННАЯ КОРЗИНА WOOCOMMERCE 
   ========================================================= */

/* Общий контейнер (две колонки) */
.custom-modern-cart {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 30px;
    align-items: flex-start;
}

/* Левая часть (товары) */
.cart-items-section {
    flex: 1 1 60%;
    min-width: 300px;
}

/* Правая часть (Итоги) */
.cart-totals-section {
    flex: 0 0 35%;
    min-width: 300px;
    background: #f8f9fa; /* Светло-серый фон */
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    position: sticky;
    top: 40px; /* Прилипает при прокрутке */
}

/* --- ТАБЛИЦА ТОВАРОВ --- */
.woocommerce-cart-form__contents {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce-cart-form__contents th {
    text-align: left;
    padding-bottom: 15px;
    border-bottom: 2px solid #eaeaea;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    color: #888;
}

.woocommerce-cart-form__contents td {
    padding: 20px 0;
    border-bottom: 1px solid #eaeaea;
    vertical-align: middle;
}

/* Изображение товара */
.product-thumbnail img {
    width: 90px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Название товара */
.product-name a {
    color: #222;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s;
}
.product-name a:hover { color: #0056b3; }

/* Цена */
.product-price, .product-subtotal {
    font-weight: bold;
    color: #333;
}

/* Кнопка удаления (крестик) */
a.remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #ff4d4d;
    color: white !important;
    border-radius: 50%;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: 0.3s;
}
a.remove:hover {
    background: #cc0000;
    transform: scale(1.1);
}

/* Поле количества */
.quantity input.qty {
    width: 60px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
}

/* --- НИЖНЯЯ ПАНЕЛЬ (Купон и кнопка обновления) --- */
td.actions {
    padding-top: 30px !important;
    border-bottom: none !important;
}
.coupon {
    float: left;
    display: flex;
    gap: 10px;
}
.coupon input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
}
.button {
    background: #222;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}
.button:hover { background: #444; }

.update-cart-btn {
    float: right;
    background: #f1f1f1;
    color: #333;
}
.update-cart-btn:hover { background: #e2e2e2; }

/* --- ИТОГИ КОРЗИНЫ (Правая колонка) --- */
.cart_totals h2 {
    margin-top: 0;
    font-size: 22px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.cart_totals table {
    width: 100%;
    border-collapse: collapse;
}
.cart_totals th, .cart_totals td {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}
.cart_totals th { text-align: left; color: #666; }
.cart_totals td { text-align: right; font-weight: bold; }

/* Кнопка "Перейти к оформлению" */
.checkout-button {
    display: block;
    width: 100%;
    text-align: center;
    background: #007bff;
    color: white;
    padding: 15px;
    border-radius: 8px;
    font-size: 18px;
    text-decoration: none;
    margin-top: 25px;
}
.checkout-button:hover {
    background: #0056b3;
    color: white;
}

/* Адаптивность для телефонов */
@media (max-width: 992px) {
    .custom-modern-cart { flex-direction: column; }
    .cart-totals-section { position: static; width: 100%; box-sizing: border-box;}

    /* Делаем таблицу скроллируемой на мобильных, чтобы не ломался дизайн */
    .cart-items-section { overflow-x: auto; width: 100%; }
    .woocommerce-cart-form__contents { min-width: 600px; }
}