/**
 * Стили для страницы корзины
 */

.cart-page {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.cart-items {
    margin-bottom: 40px;
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr 150px 150px 50px;
    gap: 20px;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background: var(--white);
}

.cart-item:last-child {
    border-bottom: none;
}

.item-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-section);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-info {
    flex: 1;
}

.item-name {
    font-size: 16px;
    font-weight: normal;
    margin: 0 0 10px 0;
}

.item-name a {
    color: var(--text-dark);
    text-decoration: none;
}

.item-name a:hover {
    color: var(--primary-red);
}

.item-size {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 10px;
}

.item-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-red);
}

.item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.qty-btn:hover {
    background: var(--bg-section);
    border-color: var(--primary-color);
}

.qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qty-value {
    font-size: 16px;
    min-width: 30px;
    text-align: center;
}

.item-total {
    font-size: 18px;
    font-weight: bold;
    text-align: right;
    color: var(--text-dark);
}

.btn-remove {
    width: 30px;
    height: 30px;
    border: none;
    background: #ffebee;
    color: #c62828;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #ffcdd2;
}

.cart-summary {
    background: var(--bg-section);
    padding: 30px;
    border-radius: 8px;
    max-width: 400px;
    margin-left: auto;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 18px;
}

.total-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-red);
}

.btn-checkout {
    display: block;
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s;
    margin-top: 20px;
}

.btn-checkout:hover {
    background: var(--primary-red);
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.cart-empty p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.btn-continue-shopping {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-continue-shopping:hover {
    background: var(--primary-red);
}

/* ========== Адаптивность ========== */
@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 100px 1fr;
        gap: 15px;
    }
    
    .item-quantity,
    .item-total,
    .item-actions {
        grid-column: 1 / -1;
    }
    
    .item-quantity {
        justify-content: flex-start;
    }
    
    .item-total {
        text-align: left;
    }
    
    .cart-summary {
        max-width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 500px) {
    .cart-page {
        padding: 15px;
    }
    
    .cart-item {
        padding: 15px;
    }
    
    .item-image {
        width: 80px;
        height: 80px;
    }
}

