/* cart.css – стили для страницы корзины (минималистичная) */

.cart-page {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.cart-container h1 {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 400;
    color: #3e2e1f;
    margin-bottom: 32px;
    letter-spacing: 0.5px;
    font-family: 'Playfair Display', Georgia, serif;
}

/* ===== ПУСТАЯ КОРЗИНА ===== */
.cart-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #ebe5dd;
}

.cart-empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
    display: block;
}

.cart-empty-state p {
    font-size: 1rem;
    color: #7a6852;
    margin-bottom: 20px;
}

.btn-catalog {
    display: inline-block;
    background: #2c3e50;
    color: #fff;
    padding: 8px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    transition: background 0.2s;
}

.btn-catalog:hover {
    background: #1e2a36;
}

/* ===== ОСНОВНАЯ СЕТКА ===== */
.cart-layout {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.cart-items {
    flex: 2;
    min-width: 280px;
}

.cart-sidebar {
    flex: 1;
    min-width: 240px;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    margin-top: 69px;
}

/* ===== ШАПКА КОРЗИНЫ ===== */
.cart-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 8px 0;
    border-bottom: 1px solid #ebe5dd;
}

.select-all-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #5a4a3a;
}

.select-all-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #b8955c;
}

.bulk-remove-btn {
    display: none;
    background: transparent;
    border: 1px solid #e0d2c0;
    padding: 4px 14px;
    border-radius: 40px;
    font-size: 0.75rem;
    cursor: pointer;
    color: #7a6852;
    transition: all 0.2s;
}

.bulk-remove-btn:hover {
    border-color: #b8955c;
    color: #3e2e1f;
}

/* ===== КАРТОЧКА ТОВАРА ===== */
.cart-item {
    display: flex;
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1px solid #ebe5dd;
    position: relative;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.cart-item:hover {
    border-color: #d4c5b5;
}

.cart-item-checkbox {
    margin-right: 14px;
    flex-shrink: 0;
}

.cart-item-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #b8955c;
    cursor: pointer;
}

.cart-item-image {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f7f4f0;
    pointer-events: none;
    border: 1px solid #ebe5dd;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    padding-left: 14px;
    position: relative;
    pointer-events: none;
}

.cart-item-title {
    font-weight: 500;
    font-size: 0.9rem;
    color: #4a3727;
    margin-bottom: 4px;
    padding-right: 32px;
}

.cart-item-price {
    color: #4a3727;
    font-weight: 400;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0;
}

.cart-item-quantity .qty-minus,
.cart-item-quantity .qty-plus {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #ffffff;
    cursor: pointer;
    font-weight: 400;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    position: relative;
    z-index: 2;
    transition: all 0.2s;
    color: #4a3727;
}

.cart-item-quantity .qty-minus:hover,
.cart-item-quantity .qty-plus:hover {
    border-color: #b8955c;
    background: #f7f4f0;
}

.cart-item-quantity .qty-value {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 0.85rem;
    color: #3e2e1f;
    pointer-events: none;
}

.cart-item-total {
    font-size: 0.8rem;
    color: #5a4a3a;
    margin-top: 4px;
}

.cart-item-total .item-total {
    font-weight: 500;
}

.cart-remove-item {
    position: absolute;
    top: 4px;
    right: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #a09080;
    padding: 4px;
    line-height: 1;
    border-radius: 4px;
    pointer-events: auto;
    z-index: 2;
    transition: all 0.2s;
}

.cart-remove-item:hover {
    color: #c0392b;
    background: rgba(192, 57, 43, 0.06);
}

/* ===== БОКОВАЯ ПАНЕЛЬ ===== */
.cart-summary {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px 24px;
    border: 1px solid #ebe5dd;
}

.cart-summary h3 {
    font-size: 1rem;
    font-weight: 500;
    color: #3e2e1f;
    margin-bottom: 16px;
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: 0.5px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ebe5dd;
    font-size: 0.9rem;
    color: #5a4a3a;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row .amount {
    font-weight: 500;
    color: #3e2e1f;
}

.btn-checkout {
    width: 100%;
    background: #2c3e50;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 16px;
    letter-spacing: 0.3px;
}

.btn-checkout:disabled {
    background: #d0c8c0;
    cursor: not-allowed;
}

.btn-checkout:hover:not(:disabled) {
    background: #1e2a36;
}

/* ===== МОБИЛЬНАЯ ВЕРСИЯ ===== */
@media (max-width: 768px) {
    .cart-page {
        padding: 0 12px;
        margin: 20px auto;
    }

    .cart-container h1 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .cart-layout {
        flex-direction: column;
        gap: 16px;
    }

    .cart-items {
        min-width: auto;
        width: 100%;
        margin-bottom: 120px;
    }

    /* ===== КНОПКА ОФОРМЛЕНИЯ ===== */
    .cart-sidebar {
        position: fixed;
        bottom: 60px;
        left: 0;
        right: 0;
        z-index: 1001;
        background: transparent;
        margin: 0;
        padding: 8px 0 8px 0;
        min-width: auto;
        top: auto;
        pointer-events: none;
    }

    .cart-summary {
        background: transparent;
        padding: 0;
        border: none;
        border-radius: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0;
        pointer-events: auto;
        max-width: 100%;
    }

    .cart-summary h3 {
        display: none;
    }

    .summary-row {
        display: none;
    }

    /* Кнопка: по умолчанию — цвет как у навигации */
    .btn-checkout {
        margin: 0;
        padding: 14px 20px;
        font-size: 0.95rem;
        flex: 1;
        width: 100%;
        border-radius: 8px;
        background: #d4c5b5; /* как навигация */
        color: #7a6b5e;
        border: none;
        font-weight: 500;
        letter-spacing: 0.3px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        transition: background 0.25s, color 0.25s, box-shadow 0.25s;
        pointer-events: auto;
        min-height: 48px;
        text-align: center;
        display: block;
        cursor: default;
    }

    /* Кнопка: активна (есть выбранные товары) */
    .btn-checkout.active {
        background: #2c3e50; /* синий */
        color: #fff;
        box-shadow: 0 4px 16px rgba(44, 62, 80, 0.25);
        cursor: pointer;
    }

    .btn-checkout.active:hover {
        background: #1e2a36;
    }

    /* Кнопка: отключена */
    .btn-checkout:disabled {
        background: #e8e0d8;
        color: #b0a090;
        cursor: not-allowed;
        box-shadow: none;
    }

    .btn-checkout:disabled .checkout-total {
        color: #b0a090;
    }

    /* Сумма внутри кнопки */
    .btn-checkout .checkout-total {
        font-weight: 600;
    }

    .cart-summary .mobile-total {
        display: none;
    }

    .cart-item {
        padding: 10px 12px;
        border-radius: 6px;
        margin-bottom: 8px;
        flex-wrap: nowrap;
        align-items: center;
    }

    .cart-item-image {
        width: 56px;
        height: 56px;
    }

    .cart-item-info {
        padding-left: 10px;
    }

    .cart-item-title {
        font-size: 0.8rem;
        padding-right: 24px;
    }

    .cart-item-price {
        font-size: 0.75rem;
    }

    .cart-item-quantity {
        gap: 4px;
        margin: 2px 0;
    }

    .cart-item-quantity .qty-minus,
    .cart-item-quantity .qty-plus {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .cart-item-quantity .qty-value {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .cart-item-total {
        font-size: 0.7rem;
        margin-top: 2px;
    }

    .cart-remove-item {
        top: 2px;
        right: 2px;
        font-size: 0.85rem;
    }

    .cart-header-actions {
        padding: 6px 0;
        margin-bottom: 12px;
        border-bottom: 1px solid #ebe5dd;
    }

    .select-all-checkbox {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .cart-item-image {
        width: 48px;
        height: 48px;
    }

    .cart-item-title {
        font-size: 0.7rem;
    }

    .cart-item-price {
        font-size: 0.65rem;
    }

    .cart-item-quantity .qty-minus,
    .cart-item-quantity .qty-plus {
        width: 22px;
        height: 22px;
        font-size: 0.65rem;
    }

    .cart-item-quantity .qty-value {
        width: 22px;
        height: 22px;
        font-size: 0.65rem;
    }

    .cart-item-total {
        font-size: 0.6rem;
    }

    .cart-item {
        padding: 8px 10px;
    }

    .cart-sidebar {
        bottom: 54px;
        padding: 6px 0 6px 0;
    }

    .btn-checkout {
        font-size: 0.85rem;
        padding: 12px 16px;
        min-height: 42px;
        border-radius: 6px;
    }

    .cart-items {
        margin-bottom: 110px;
    }
}