/* Cart Page - Modern Design */
:root {
    --primary: #000000;
    --primary-dark: #1a1a1a;
    --text-dark: #000000;
    --text-light: #666666;
    --border-light: #e0e0e0;
    --bg-light: #f5f5f5;
    --success: #28a745;
    --danger: #dc3545;
}

.cart {
    padding-top: 3rem;
    padding-bottom: 3rem;
    min-height: 70vh;
}

/* Cart Header */
.cart h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.cart hr {
    border: none;
    border-top: 2px solid var(--border-light);
    margin-bottom: 2rem;
}

/* Alert Styling */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #856404;
}

/* Cart Items Container */
.cart-items-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin-top: 2rem;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Cart Item Card */
.cart-item {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    display: flex;
    gap: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cart-item:hover {
    box-shadow: 0 4px 16px rgba(139, 94, 60, 0.1);
    border-color: var(--primary);
}

.cart-item-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
}

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

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-header {
    margin-bottom: 0.5rem;
}

.cart-item-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.cart-item-variant {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0.25rem 0 0 0;
}

.cart-item-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.5rem 0 0 0;
}

.cart-item-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}

.quantity-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-input {
    width: 70px;
    padding: 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    text-align: center;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.quantity-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 94, 60, 0.1);
}

.remove-btn {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
    text-decoration: none;
}

.remove-btn:hover {
    color: #c82333;
    text-decoration: underline;
}

.stock-warning {
    font-size: 0.85rem;
    color: var(--danger);
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--bg-light);
    border-radius: 12px;
    margin: 2rem 0;
}

.empty-cart p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Cart Summary Sidebar */
.cart-summary {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    height: fit-content;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.summary-row.total {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-light);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    margin-top: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(139, 94, 60, 0.2);
}

.checkout-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 94, 60, 0.3);
}

.checkout-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.continue-shopping {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.continue-shopping:hover {
    background: var(--primary);
    color: #fff;
}

/* Desktop Layout */
@media (min-width: 768px) {
    .cart {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .cart h2 {
        font-size: 2.5rem;
    }
}

/* Mobile Layout */
@media (max-width: 767px) {
    .cart {
        padding-top: 1.5rem;
        padding-bottom: 2rem;
        min-height: 85vh;
    }

    .cart h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .cart-items-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cart-item {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .cart-item-image {
        width: 100%;
        height: 200px;
    }

    .cart-item-actions {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .quantity-input {
        width: 60px;
    }

    .cart-summary {
        position: static;
        margin-top: 2rem;
    }

    .empty-cart {
        padding: 2rem 1rem;
    }
}