/* cart.css - Enhanced Cart Styles */
:root {
    --cart-green: #2E7D32;
    --cart-green-light: #4CAF50;
    --cart-green-lighter: #E8F5E9;
    --cart-error: #D32F2F;
    --cart-warning: #F57C00;
}

/* Main Cart Layout */
.cart-main {
    min-height: 70vh;
    padding: 40px 0 80px;
    background: linear-gradient(180deg, #f9f7f2 0%, var(--off-white) 100%);
}

.cart-header {
    text-align: center;
    padding: 0 0 40px;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(139, 115, 85, 0.1);
}

.cart-header h1 {
    font-size: 2.8rem;
    color: var(--dark-brown);
    margin-bottom: 10px;
    font-weight: 700;
}

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

/* Progress Steps */
.cart-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.cart-progress::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50px;
    right: 50px;
    height: 2px;
    background: var(--sand);
    z-index: 1;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.progress-step.active .step-number {
    background: var(--primary-brown);
    color: white;
    border-color: var(--primary-brown);
    transform: scale(1.1);
}

.progress-step.active .step-label {
    color: var(--dark-brown);
    font-weight: 600;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--sand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.9rem;
    color: var(--text-light);
    transition: color 0.3s ease;
}

/* Empty Cart State */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(139, 115, 85, 0.08);
    max-width: 500px;
    margin: 0 auto;
}

.empty-cart-icon {
    width: 100px;
    height: 100px;
    background: var(--light-beige);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.empty-cart-icon i {
    font-size: 3rem;
    color: var(--primary-brown);
}

.empty-cart h2 {
    color: var(--dark-brown);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.empty-cart p {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 1.1rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.empty-cart .btn {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Cart Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 992px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
}

/* Cart Items Section */
.cart-items-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(139, 115, 85, 0.08);
}

.cart-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--light-beige);
}

.cart-section-header h2 {
    color: var(--dark-brown);
    font-size: 1.5rem;
    margin: 0;
}

#clearCartBtn {
    background: none;
    border: none;
    color: var(--cart-error);
    font-weight: 500;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

#clearCartBtn:hover {
    background: rgba(211, 47, 47, 0.1);
}

/* Cart Items */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 20px;
    padding: 25px;
    background: var(--off-white);
    border-radius: 15px;
    border: 1px solid rgba(139, 115, 85, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.cart-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 115, 85, 0.12);
    border-color: rgba(139, 115, 85, 0.2);
}

.cart-item-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cart-item:hover .cart-item-image img {
    transform: scale(1.05);
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cart-item-category {
    color: var(--secondary-brown);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cart-item-title {
    font-size: 1.3rem;
    color: var(--dark-brown);
    margin-bottom: 10px;
    font-weight: 600;
}

.cart-item-variant {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.variant-chip {
    background: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
    border: 1px solid var(--sand);
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-item-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-brown);
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid var(--sand);
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--light-beige);
    color: var(--dark-brown);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: var(--sand);
}

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

.quantity-input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-brown);
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--cart-error);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.cart-item-remove:hover {
    background: rgba(211, 47, 47, 0.1);
}

.cart-item-subtotal {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 600;
    text-align: right;
    margin-top: 10px;
}

/* Order Summary */
.cart-summary {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(139, 115, 85, 0.08);
    position: sticky;
    top: 100px;
    height: fit-content;
}

.summary-header {
    padding-bottom: 20px;
    border-bottom: 2px solid var(--light-beige);
    margin-bottom: 25px;
}

.summary-header h2 {
    color: var(--dark-brown);
    font-size: 1.5rem;
    margin: 0;
}

.summary-details {
    margin-bottom: 30px;
}

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

.summary-row span:first-child {
    color: var(--text-light);
}

.summary-row span:last-child {
    font-weight: 500;
    color: var(--text-dark);
}

.summary-row.total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-brown);
    margin-top: 20px;
}

.summary-divider {
    height: 1px;
    background: var(--light-beige);
    margin: 20px 0;
}

.eco-badge {
    color: var(--cart-green);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.eco-badge::before {
    content: '✓';
}

.savings-notice {
    background: var(--cart-green-lighter);
    padding: 12px 15px;
    border-radius: 10px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--cart-green);
    font-size: 0.95rem;
}

.savings-notice i {
    font-size: 1.1rem;
}

.checkout-btn {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 115, 85, 0.3);
}

.payment-methods {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--light-beige);
    border-bottom: 1px solid var(--light-beige);
    margin-bottom: 20px;
}

.payment-methods span {
    display: block;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 1.8rem;
    color: var(--text-light);
}

.security-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.security-notice i {
    color: var(--cart-green);
}

.continue-shopping {
    text-align: center;
    padding-top: 30px;
    border-top: 2px solid rgba(139, 115, 85, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-main {
        padding: 20px 0 40px;
    }
    
    .cart-header h1 {
        font-size: 2.2rem;
    }
    
    .cart-progress {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .cart-progress::before {
        display: none;
    }
    
    .cart-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .cart-item-image {
        width: 100%;
        height: 200px;
        margin: 0 auto;
    }
    
    .cart-item-variant {
        justify-content: center;
    }
    
    .cart-item-actions {
        align-items: center;
    }
    
    .cart-section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .cart-items-section,
    .cart-summary {
        padding: 20px;
    }
    
    .empty-cart {
        padding: 40px 20px;
    }
    
    .empty-cart-icon {
        width: 80px;
        height: 80px;
    }
    
    .empty-cart-icon i {
        font-size: 2.5rem;
    }
    
    .cart-item {
        padding: 20px;
    }
}