/* =========================================
   CART PAGE STYLES (cart.css)
   ========================================= */

/* Main Grid Layout */
.bag-container { 
    max-width: 1200px; 
    margin: 40px auto 80px; /* Bottom margin extra for mobile nav */
    padding: 0 20px; 
    display: grid; 
    grid-template-columns: 1.8fr 1fr; 
    gap: 30px; 
    align-items: start; 
}

/* --- Left Side: Items Box --- */
.bag-items-box { 
    background: var(--white); 
    border-radius: 12px; 
    padding: 30px; 
    box-shadow: var(--shadow); 
    border: 1px solid var(--border-color); 
}

.bag-title { 
    font-size: 1.5rem; 
    font-weight: 600; 
    color: var(--secondary); 
    padding-bottom: 15px; 
    border-bottom: 2px solid var(--bg-color); 
    margin-bottom: 15px; 
    font-family: 'Playfair Display', serif; 
}

/* Cart Item Styling */
.bag-item { 
    display: flex; 
    gap: 20px; 
    padding: 25px 0; 
    border-bottom: 1px solid var(--border-color); 
    position: relative; 
    transition: background 0.3s ease;
}

.bag-item:hover {
    background: #fafafa;
    border-radius: 8px;
    padding-left: 10px;
    padding-right: 10px;
}

.bag-item img { 
    width: 120px; 
    height: 120px; 
    object-fit: cover; 
    border-radius: 10px; 
    border: 1px solid #eee; 
    flex-shrink: 0; 
    background: #f9f9f9;
}

.bag-item-details { 
    flex: 1; 
    min-width: 0; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
}

.bag-item-name { 
    font-size: 1.1rem; 
    color: var(--text-dark); 
    margin: 0 0 10px 0; 
    line-height: 1.4; 
    padding-right: 40px; /* Space for remove button */
    font-weight: 600; 
}

/* The Price & Qty Row */
.bag-action-row { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    flex-wrap: wrap; 
    gap: 15px; 
    margin-top: auto; 
}

.unit-price { 
    font-size: 0.95rem; 
    color: var(--text-light); 
    font-weight: 500; 
    margin-bottom: 10px;
}

/* Qty Controls */
.qty-controls { 
    display: inline-flex; 
    align-items: center; 
    background: var(--white); 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    overflow: hidden; 
}

.qty-btn { 
    background: var(--bg-color); 
    border: none; 
    padding: 8px 15px; 
    font-size: 1.1rem; 
    font-weight: bold; 
    color: var(--text-dark); 
    cursor: pointer; 
    transition: 0.3s; 
}

.qty-btn:hover { 
    background: var(--primary); 
    color: var(--white); 
}

.qty-value { 
    padding: 8px 15px; 
    font-size: 0.95rem; 
    font-weight: 600; 
    border-left: 1px solid var(--border-color); 
    border-right: 1px solid var(--border-color); 
    min-width: 45px; 
    text-align: center; 
}

/* Live Item Total */
.item-live-total { 
    font-size: 1.2rem; 
    color: var(--primary); 
    font-weight: 700; 
}

/* Remove Button */
.remove-btn { 
    position: absolute; 
    top: 25px; 
    right: 0; 
    background: #fff0f0; 
    border: none; 
    color: #e74c3c; 
    padding: 8px 12px; 
    border-radius: 6px; 
    font-size: 0.85rem; 
    font-weight: 600; 
    cursor: pointer; 
    transition: 0.3s ease; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
}

.remove-btn:hover { 
    background: #e74c3c; 
    color: var(--white); 
    transform: translateY(-2px);
}

/* --- Right Side: Order Summary --- */
.bag-summary-box { 
    background: var(--white); 
    padding: 30px; 
    border-radius: 12px; 
    border: 1px solid var(--border-color); 
    position: sticky; 
    top: 100px; 
    box-shadow: var(--shadow);
}

.summary-title { 
    font-size: 1.25rem; 
    font-weight: 600; 
    color: var(--secondary); 
    padding-bottom: 15px; 
    border-bottom: 2px solid var(--bg-color); 
    margin-bottom: 20px; 
    font-family: 'Playfair Display', serif; 
}

.bill-row { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 15px; 
    font-size: 0.95rem; 
    color: #555; 
}

.bill-row.total-row { 
    font-size: 1.25rem; 
    font-weight: 700; 
    color: var(--secondary); 
    border-top: 2px dashed #ddd; 
    padding-top: 20px; 
    margin-top: 10px; 
}

.checkout-btn { 
    width: 100%; 
    background: var(--secondary); 
    color: var(--white); 
    padding: 16px; 
    border: none; 
    border-radius: 30px; 
    font-size: 1rem; 
    font-weight: 600; 
    cursor: pointer; 
    margin-top: 25px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    transition: 0.3s ease; 
}

.checkout-btn:hover { 
    background: var(--primary); 
    box-shadow: 0 8px 20px rgba(233, 30, 99, 0.2); 
    transform: translateY(-2px); 
}

.secure-note { 
    text-align: center; 
    margin-top: 15px; 
    color: #27ae60; 
    font-size: 0.85rem; 
    font-weight: 500; 
}

/* --- Empty State --- */
.empty-bag-msg { 
    text-align: center; 
    padding: 80px 20px; 
    background: var(--white); 
    border-radius: 12px; 
    border: 1px solid var(--border-color); 
    max-width: 600px; 
    margin: 60px auto; 
    box-shadow: var(--shadow);
}

.empty-icon-wrap {
    width: 100px;
    height: 100px;
    background: rgba(233, 30, 99, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 25px;
}

.empty-bag-msg i { 
    font-size: 45px; 
    color: var(--primary); 
}

.empty-bag-msg h2 { 
    font-family: 'Playfair Display', serif; 
    font-size: 2rem; 
    color: var(--secondary); 
    margin-bottom: 10px; 
}

.empty-bag-msg p { 
    color: var(--text-light); 
    margin-bottom: 25px; 
    font-size: 1.05rem; 
    line-height: 1.5;
}

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 900px) {
    .bag-container { 
        grid-template-columns: 1fr; 
    }
    .bag-summary-box { 
        position: static; 
    }
}

@media (max-width: 600px) {
    .bag-container { 
        padding: 0 15px; 
        gap: 20px; 
        margin-bottom: 80px; /* Space for Bottom Nav */
        margin-top: 20px; 
    }
    
    .bag-items-box, 
    .bag-summary-box { 
        padding: 20px 15px; 
    }
    
    .bag-item { 
        padding: 20px 0; 
        flex-direction: column; 
    }
    
    .bag-item:hover {
        padding-left: 0;
        padding-right: 0;
        background: transparent;
    }
    
    .bag-item-top { 
        display: flex; 
        gap: 15px; 
    }
    
    .bag-item-top img { 
        width: 90px; 
        height: 90px; 
    }
    
    .bag-item-name { 
        font-size: 0.95rem; 
        line-height: 1.4; 
        margin-bottom: 6px; 
        padding-right: 0; 
    }
    
    .unit-price { 
        font-size: 0.85rem; 
    }

    .bag-action-row { 
        margin-top: 15px; 
        width: 100%; 
        border-top: 1px dashed var(--border-color); 
        padding-top: 15px; 
    }
    
    .qty-controls { 
        transform: scale(0.95); 
        transform-origin: left; 
        margin: 0; 
    }
    
    .item-live-total { 
        font-size: 1.1rem; 
    }

    .remove-btn { 
        top: 20px; 
        right: 0; 
        padding: 6px 10px; 
        font-size: 0.8rem; 
        background: transparent;
    }
    
    .remove-btn span { 
        display: none; /* Hide 'Remove' text on mobile, just show icon */
    }
    
    .remove-btn i {
        font-size: 1.1rem;
    }
}