/* ======================================================
   CART PAGE LAYOUT
   ====================================================== */

/* Main Grid Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 350px; /* Left: Auto, Right: Fixed 350px */
    gap: 2rem;
    align-items: start;
}

/* LEFT COLUMN: Cart Items */
.cart-items-container {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
}

/* Empty State */
.empty-cart-msg {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
    font-size: 1.1rem;
}

/* Cart Item Row */
.cart-item {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f3f4f6;
}

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

.item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    background: #f9fafb;
    border: 1px solid #eee;
}

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

.item-details h3 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.item-price {
    font-weight: 700;
    color: #111;
    font-size: 0.95rem;
}

/* Quantity Controls */
.qty-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.qty-val {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* Remove Button */
.btn-remove {
    margin-left: auto;
    color: #ef4444;
    background: none;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}
.btn-remove:hover { color: #dc2626; }


/* RIGHT COLUMN: Summary Box */
.cart-summary {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    position: sticky;
    top: 100px; /* Sticks when scrolling */
}

.cart-header {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 10px;
    border-bottom: 1px solid #f3f4f6;
    color: #111;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #4b5563;
}

.total-row {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    font-weight: 800;
    color: #111;
    font-size: 1.1rem;
}

/* Discount Row Styling */
.discount-row {
    color: #10B981; /* Green */
    font-weight: 600;
}

/* Promo Code Input Box */
.promo-box {
    display: flex;
    gap: 8px;
    margin: 20px 0 10px 0;
}

.promo-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.promo-input:focus {
    outline: none;
    border-color: #111;
}

.btn-apply {
    background: #374151;
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.btn-apply:hover { background: #111; }

/* Checkout Button */
.full-width {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 1.5rem;
    border-radius: 6px;
}

/* ======================================================
   MOBILE RESPONSIVENESS
   ====================================================== */
@media (max-width: 900px) {
    .cart-layout {
        grid-template-columns: 1fr; /* Stack columns */
        gap: 1.5rem;
    }

    .cart-items-container, .cart-summary {
        padding: 1rem;
    }

    /* Make cart items smaller on mobile */
    .item-img {
        width: 60px;
        height: 60px;
    }
    
    .cart-summary {
        position: static; /* Stop sticky behavior on mobile */
    }
}

.empty-cart-msg {
    text-align: center;
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.btn-primary {
    background: #000;
    color: #fff;
    padding: 12px 25px;
    border-radius: 99px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
}