/* =============================================
   КОРЗИНА – БЕЗ ЧЕКБОКСОВ, МОБИЛЬНАЯ ЧАСТЬ GRID
============================================= */

.cart-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}
.cart-page-title {
    font-size: 26px;
    font-weight: 500;
    margin: 0 0 20px 0;
    color: #1a1a1a;
    text-align: center;
}
.cart-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}
.cart-main {
    flex: 2;
    min-width: 0;
}
.cart-sidebar {
    flex: 1;
    min-width: 280px;
}

/* Баннер */
.cart-sale-banner {
    background: #f8f8f8;
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.sale-text {
    font-size: 14px;
    color: #1a1a1a;
}
.sale-highlight { font-weight: 600; }
.sale-count {
    font-weight: 700;
    color: #e74c3c;
    margin: 0 4px;
}
.sale-message { color: #666; }
.sale-button {
    background: #1a1a1a;
    color: #fff;
    padding: 8px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: background 0.2s;
    white-space: nowrap;
}
.sale-button:hover { background: #444; }

/* Управление */
.cart-actions-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.cart-actions-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
/* ===== ОБЩИЙ СТИЛЬ ДЛЯ ВСЕХ КНОПОК ===== */
.share-cart-btn,
.remove-all-btn,
.update-cart-btn {
    background: #f5f5f5;
    border: none;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    padding: 8px 18px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
/* ===== HOVER ДЛЯ КАЖДОЙ КНОПКИ ===== */
.share-cart-btn:hover,
.update-cart-btn:hover {
    background: #e0e0e0;
}
.remove-all-btn:hover {
    background: #fee;
    color: #c00;
}

/* Таблица (ПК) */
.cart-items-table-wrap {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
}
.cart-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.cart-items-table tbody td {
    padding: 14px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
.cart-items-table .col-thumbnail {
    width: 80px;
    text-align: center;
}
.cart-items-table .col-thumbnail img {
    max-width: 60px;
    height: auto;
    border-radius: 8px;
}
.cart-items-table .col-name {
    font-weight: 500;
    font-size: 13px;
    word-break: break-word;
}
.cart-items-table .col-name a {
    color: #1a1a1a;
    text-decoration: none;
}
.cart-items-table .col-name a:hover { color: #007cba; }
.cart-items-table .col-price,
.cart-items-table .col-subtotal {
    font-weight: 300;
    font-size: 12px;
    white-space: nowrap;
}
.cart-items-table .col-price .woocommerce-Price-amount,
.cart-items-table .col-subtotal .woocommerce-Price-amount {
    font-weight: 300;
    font-size: 12px;
}
.cart-items-table .col-quantity {
    width: 110px;
}
.cart-items-table .col-quantity .quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}
.cart-items-table .col-quantity .qty-minus,
.cart-items-table .col-quantity .qty-plus {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background 0.2s;
}
.cart-items-table .col-quantity .qty-minus:hover,
.cart-items-table .col-quantity .qty-plus:hover { background: #f0f0f0; }
.cart-items-table .col-quantity .qty-input {
    width: 40px;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    font-size: 12px;
}
.cart-items-table .col-remove {
    text-align: center;
    vertical-align: middle;
    width: 40px;
}
.cart-items-table .remove-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f8f8f8;
    color: #999;
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    text-decoration: none;
    transition: all 0.2s;
}
.cart-items-table .remove-item:hover {
    background: #e74c3c;
    color: #fff;
}
.cart-empty {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* ---- СТИЛИ ДЛЯ ЗАЧЕРКНУТОЙ ЦЕНЫ ---- */
.cart-items-table .col-price .old-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 6px;
    font-weight: 300;
    font-size: 12px;
}
.cart-items-table .col-price .sale-price {
    font-weight: 600;
    color: #e74c3c;
    font-size: 13px;
}

/* Правая колонка */
.cart-sidebar .checkout-block {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 20px;
    margin-bottom: 20px;
}
.checkout-block .checkout-button {
    display: block;
    background: #1a1a1a;
    color: #fff;
    padding: 14px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: background 0.2s;
    width: 100%;
    box-sizing: border-box;
}
.checkout-block .checkout-button:hover { background: #444; }
.checkout-block .checkout-hint {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin: 10px 0 0 0;
}
.cart-summary-block {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 20px;
}
.summary-title {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 15px 0;
    color: #1a1a1a;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}
.summary-row:last-of-type { border-bottom: none; }
.summary-label { color: #666; }
.summary-value {
    font-weight: 400;
    color: #1a1a1a;
}
.total-row .summary-label,
.total-row .summary-value {
    font-weight: 600;
    font-size: 15px;
}
.discount-row .summary-value { color: #e74c3c; }
.subtotal-row .summary-value {
    font-weight: 300;
    font-size: 13px;
    color: #666;
}

.discount-row .summary-value {
    color: #e74c3c;
}

.coupon-block {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}
.coupon-block .coupon-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 13px;
    box-sizing: border-box;
    margin-bottom: 10px;
}
.coupon-block .apply-coupon-btn {
    width: 100%;
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.coupon-block .apply-coupon-btn:hover { background: #444; }
.coupon-hint {
    font-size: 12px;
    color: #999;
    margin: 8px 0 0 0;
}
.delivery-hint {
    font-size: 12px;
    color: #999;
    margin: 15px 0 0 0;
    line-height: 1.4;
}

/* Модалки */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: #fff;
    max-width: 500px;
    width: 90%;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}
.modal-close:hover { color: #1a1a1a; }
.modal-content h3 {
    font-size: 20px;
    font-weight: 500;
    margin: 0 0 15px 0;
}
.modal-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}
.share-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
    font-size: 14px;
}
.share-list div {
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}
.copy-link-btn {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
}
.copy-link-btn:hover { background: #444; }
.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: flex-end;
}
.modal-actions .modal-cancel {
    background: #f0f0f0;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
}
.modal-actions .modal-cancel:hover { background: #ddd; }
.modal-actions .modal-confirm {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
}
.modal-actions .modal-confirm:hover { background: #c0392b; }

/* Скрытие/показ для ПК и мобильных */
.desktop-only { display: table-cell; }
.mobile-only { display: none; }

/* ===== МОБИЛЬНАЯ ВЕРСИЯ (строгая структура через grid) ===== */
@media (max-width: 768px) {
    .cart-page-wrapper { padding: 20px 10px; }
    .cart-grid { flex-direction: column; }
    .cart-main, .cart-sidebar { flex: 1; min-width: 0; }
    .cart-sale-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
    }
    .sale-button {
        white-space: normal;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }
    .cart-actions-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .cart-actions-left {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
    }
    /* Кнопка "Обновить корзину" – на всю ширину */
    .cart-actions-left .update-cart-btn {
        flex: 0 0 100%;
        margin-bottom: 4px;
        text-align: center;
        white-space: nowrap;
    }
    /* Две другие кнопки – рядом */
    .cart-actions-left .share-cart-btn,
    .cart-actions-left .remove-all-btn {
        flex: 1 1 auto;
        min-width: 0;
        text-align: center;
        white-space: nowrap;
    }

    .desktop-only { display: none !important; }
    .mobile-only { display: block !important; }

    /* Каждая строка – grid 2×2 */
    .cart-items-table tbody tr {
        display: grid;
        grid-template-columns: 60px 1fr 30px;
        grid-template-rows: auto auto;
        gap: 6px 10px;
        padding: 12px;
        border: 1px solid #eee;
        border-radius: 12px;
        margin-bottom: 16px;
        background: #fff;
        align-items: center;
    }

    /* Строка 1: изображение, название, крестик */
    .cart-items-table .col-thumbnail {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        padding: 0 !important;
        margin: 0 !important;
        text-align: left;
    }
    .cart-items-table .col-thumbnail img {
        width: 60px;
        height: 60px;
        object-fit: cover;
        display: block;
        margin: 0;
        border-radius: 8px;
    }
    .cart-items-table .col-name {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        align-self: center;
        font-size: 13px;
        word-break: break-word;
        padding: 0 4px !important;
        margin: 0 !important;
    }
    .cart-items-table .col-remove-mobile {
        grid-column: 3 / 4;
        grid-row: 1 / 2;
        justify-self: end;
        align-self: center;
        padding: 0 !important;
        margin: 0 !important;
        text-align: center;
    }
    .cart-items-table .col-remove-mobile .remove-item {
        width: 24px;
        height: 24px;
        font-size: 20px;
        background: #f0f0f0;
        color: #999;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        text-decoration: none;
        transition: all 0.2s;
    }
    .cart-items-table .col-remove-mobile .remove-item:hover {
        background: #e74c3c;
        color: #fff;
    }

    /* Строка 2: цена, количество, итого */
    .cart-items-table .col-price {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
        justify-self: start;
        font-size: 13px;
        font-weight: 400;
        white-space: nowrap;
        padding: 0 !important;
        margin: 0 !important;
    }
    .cart-items-table .col-quantity {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        justify-self: center;
        padding: 0 !important;
        margin: 0 !important;
    }
    .cart-items-table .col-quantity .quantity-wrapper {
        display: flex;
        align-items: center;
        gap: 2px;
    }
    .cart-items-table .col-quantity .qty-input {
        width: 36px;
        padding: 2px;
        font-size: 13px;
        text-align: center;
        border: 1px solid #ddd;
        border-radius: 8px;
    }
    .cart-items-table .col-quantity .qty-minus,
    .cart-items-table .col-quantity .qty-plus {
        width: 22px;
        height: 22px;
        border: 1px solid #ddd;
        border-radius: 8px;
        background: #fff;
        cursor: pointer;
        font-size: 14px;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s;
    }
    .cart-items-table .col-quantity .qty-minus:hover,
    .cart-items-table .col-quantity .qty-plus:hover {
        background: #f0f0f0;
    }
    .cart-items-table .col-subtotal {
        grid-column: 3 / 4;
        grid-row: 2 / 3;
        justify-self: end;
        font-weight: 600;
        font-size: 13px;
        white-space: nowrap;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Убираем все подчёркивания и лишние отступы */
    .cart-items-table tbody td {
        border-bottom: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Скрываем ненужные колонки */
    .cart-items-table .col-select,
    .cart-items-table .col-remove {
        display: none !important;
    }
}


.share-link-wrapper {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}
.share-link-wrapper input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    color: #333;
}













/* =============================================
   ПУСТАЯ КОРЗИНА
============================================= */



/* Кнопка "Вернуться в магазин" */
.woocommerce-cart .return-to-shop {
    text-align: center;
    margin: 0 auto 40px;
    max-width: 500px;
    padding: 0 20px;
}

.woocommerce-cart .return-to-shop .button,
.woocommerce-cart .wc-backward {
    display: inline-block;
    background: #1a1a1a;
    color: #fff !important;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    text-align: center;
    line-height: 1.4;
}

.woocommerce-cart .return-to-shop .button:hover,
.woocommerce-cart .wc-backward:hover {
    background: #444;
    color: #fff !important;
}

.woocommerce-cart .cart-empty {
    padding: 15px;
    margin: 20px;
}


/* Мобильная адаптация */
@media (max-width: 768px) {
    .woocommerce-cart .return-to-shop .button,
    .woocommerce-cart .wc-backward {
        padding: 10px 24px;
        font-size: 13px;
    }
}

