/* =========================================
   PREMIUM CART STYLES
   ========================================= */

body {
    background-color: #fafafa; /* Very light grey for contrast */
}

.cart-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 60vh;
}

.page-heading {
    text-align: center;
    font-family: 'Syne', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 40px;
    font-weight: 800;
}

.secure-text {
    font-size: 0.75rem; 
    font-weight: 600; 
    letter-spacing: 1px;
    margin-left: 5px;
}

/* --- EMPTY STATE --- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-state i { font-size: 4rem; color: #ddd; margin-bottom: 20px; }
.empty-state h3 { font-family: 'Syne', sans-serif; font-size: 1.5rem; margin-bottom: 10px; }
.empty-state p { color: #666; }

/* --- SHIPPING BAR --- */
.shipping-bar-container {
    background: #fff;
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}
.progress-track {
    width: 100%; max-width: 500px;
    height: 4px; background: #eee;
    border-radius: 4px; margin: 10px auto 0; overflow: hidden;
}
.progress-fill {
    height: 100%; background: #000; width: 0%; transition: width 0.5s ease;
}

/* --- LAYOUT --- */
.cart-layout {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}
.cart-left { flex: 2; }
.cart-right { flex: 1; }

/* --- ITEMS TABLE --- */
.cart-header-row {
    display: flex;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    color: #888;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 25px 0;
    border-bottom: 1px solid #eee;
    background: #fff; /* Card look on mobile, transparent on desktop */
}

/* The Image Fix */
.cart-item img {
    width: 80px; height: 100px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 25px;
    background: #f4f4f4;
}

.item-details h4 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
}
.item-meta { font-size: 0.9rem; color: #666; margin-bottom: 5px; }

.remove-btn {
    font-size: 0.8rem; color: #999;
    cursor: pointer; text-decoration: underline;
    transition: color 0.2s;
}
.remove-btn:hover { color: #d32f2f; }

/* Quantity Buttons */
.qty-control {
    display: flex; align-items: center; justify-content: center;
}
.qty-btn {
    width: 32px; height: 32px;
    border: 1px solid #eee; background: #fff;
    cursor: pointer; font-size: 1.1rem;
    transition: 0.2s;
}
.qty-btn:hover { background: #f0f0f0; }
.qty-val {
    width: 40px; text-align: center; font-weight: 600; font-size: 0.95rem;
}

.item-total {
    text-align: right; font-weight: 700; font-size: 1.1rem;
}

/* --- SUMMARY BOX (Sticky) --- */
.summary-box {
    background: #fff;
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 8px;
    /* Sticky Effect */
    position: sticky; top: 20px; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}

.summary-box h3 {
    margin-bottom: 25px; font-family: 'Syne', sans-serif; font-size: 1.2rem;
}

.promo-box { display: flex; gap: 10px; margin-bottom: 25px; }
.promo-box input {
    flex: 1; padding: 12px; border: 1px solid #ddd; outline: none; font-family: inherit;
}
.promo-box button {
    background: #000; color: #fff; border: none; padding: 0 20px; font-weight: 600; cursor: pointer;
}

.summary-row {
    display: flex; justify-content: space-between;
    margin-bottom: 15px; font-size: 0.95rem; color: #555;
}
.summary-row.total {
    font-size: 1.3rem; font-weight: 800; color: #000;
    margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee;
}

.trust-badges {
    display: flex; justify-content: space-between;
    margin-top: 20px; font-size: 0.75rem; color: #888;
}
.payment-icons {
    margin-top: 15px; font-size: 1.5rem; color: #ccc;
    display: flex; gap: 10px; justify-content: center;
}

/* --- RECOMMENDATIONS --- */
.recommendations {
    max-width: 1200px; margin: 60px auto; padding: 0 20px;
}
.rec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 30px;
}
.rec-card {
    cursor: pointer; transition: transform 0.3s;
}
.rec-card:hover { transform: translateY(-5px); }
.rec-card img {
    width: 100%; height: 250px; object-fit: cover; border-radius: 4px;
}
.rec-card h4 { font-size: 0.95rem; margin-top: 10px; }
.rec-card p { font-weight: 700; font-size: 0.9rem; margin-top: 5px; }

.cart-footer { padding: 40px; text-align: center; color: #999; font-size: 0.85rem; }

/* =========================================
   MOBILE RESPONSIVE
   ========================================= */
@media screen and (max-width: 900px) {
    .cart-layout { flex-direction: column; gap: 30px; }
    .cart-header-row { display: none; }
    
    .cart-item {
        position: relative;
        flex-wrap: wrap;
        padding: 20px;
        margin-bottom: 15px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.03);
        border: 1px solid #eee;
        border-radius: 8px;
    }

    .cart-item img {
        width: 80px; height: 100px; /* Kept fixed size */
    }

    .item-details {
        flex: 1;
        width: calc(100% - 100px); /* Fill space next to image */
    }

    .qty-control {
        margin-top: 15px;
        justify-content: flex-start;
    }

    .item-total {
        position: absolute;
        bottom: 25px; right: 20px;
    }
}
/* =========================================
   CART PAGE STYLES (PREMIUM)
   ========================================= */

body { background: #fff; color: #111; font-family: 'Poppins', sans-serif; }

/* HEADER */
#main-header { position: sticky; top: 0; z-index: 1000; background: #fff; border-bottom: 1px solid #eee; }
.back-link { text-decoration: none; color: #000; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; }
.secure-text { font-size: 0.75rem; font-weight: 600; letter-spacing: 1px; color: #2ecc71; margin-left: 5px; }

/* SHIPPING PROGRESS BAR */
.shipping-bar-container {
    background: #f9f9f9; padding: 15px 20px; text-align: center; border-bottom: 1px solid #eee;
}
#shipping-msg { margin: 0 0 10px; font-size: 0.9rem; }
.progress-track {
    width: 100%; max-width: 600px; height: 6px; background: #e0e0e0; margin: 0 auto; border-radius: 10px; overflow: hidden;
}
.progress-fill {
    height: 100%; background: #000; width: 0%; transition: width 0.5s ease-in-out; border-radius: 10px;
}

/* LAYOUT */
.cart-wrapper { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.page-heading { font-family: 'Syne'; font-size: 2rem; font-weight: 800; margin-bottom: 30px; text-transform: uppercase; }
#cart-count-header { color: #888; font-weight: 400; font-size: 1.5rem; }

.cart-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 50px; align-items: start; }

/* LEFT: ITEMS */
.cart-header-row {
    display: flex; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 20px;
    font-size: 0.8rem; font-weight: 700; color: #888; letter-spacing: 1px;
}

.cart-item {
    display: flex; align-items: center; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid #f0f0f0;
}
.cart-item:last-child { border-bottom: none; }

.cart-img-box { width: 90px; height: 110px; flex-shrink: 0; margin-right: 20px; }
.cart-img-box img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }

.item-details { flex: 2; }
.item-details h3 { margin: 0 0 5px; font-size: 1rem; font-weight: 700; }
.item-meta { font-size: 0.85rem; color: #666; margin-bottom: 10px; }
.remove-btn {
    font-size: 0.75rem; color: #999; cursor: pointer; text-decoration: underline; transition: 0.3s;
}
.remove-btn:hover { color: #d32f2f; }

.qty-control {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.qty-btn-sm {
    width: 25px; height: 25px; border-radius: 50%; border: 1px solid #ddd;
    background: #fff; cursor: pointer; font-size: 1rem; line-height: 1;
}
.qty-val { font-weight: 600; font-size: 0.9rem; width: 20px; text-align: center; }

.item-total { flex: 1; text-align: right; font-weight: 700; font-size: 1rem; }

/* RIGHT: SUMMARY */
.summary-box {
    background: #f9f9f9; padding: 30px; border-radius: 8px; position: sticky; top: 100px;
}
.summary-box h3 { margin: 0 0 20px; font-family: 'Syne'; font-size: 1.2rem; border-bottom: 1px solid #ddd; padding-bottom: 15px; }

.promo-box { display: flex; gap: 10px; margin-bottom: 20px; }
.promo-box input {
    flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-family: 'Poppins';
}
.promo-box button {
    background: #333; color: #fff; border: none; padding: 0 15px; cursor: pointer; font-weight: 600; border-radius: 4px;
}

.summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 0.95rem; color: #555; }
.summary-row.total { font-weight: 800; color: #000; font-size: 1.2rem; margin-top: 15px; }
.summary-divider { height: 1px; background: #ddd; margin: 15px 0; }

.btn-black-block {
    width: 100%; background: #000; color: #fff; border: none; padding: 15px;
    font-weight: 700; text-transform: uppercase; cursor: pointer; margin-top: 10px; transition: 0.3s;
}
.btn-black-block:hover { background: #333; transform: translateY(-2px); }

.trust-badges { display: flex; justify-content: space-between; margin-top: 20px; font-size: 0.75rem; color: #666; }
.payment-icons { margin-top: 20px; font-size: 1.5rem; color: #888; display: flex; gap: 10px; justify-content: center; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 4rem; color: #eee; margin-bottom: 20px; }
.empty-state h3 { font-family: 'Syne'; font-size: 1.5rem; margin-bottom: 10px; }

/* RECOMMENDATIONS */
.recommendations { margin-top: 80px; padding-top: 40px; border-top: 1px solid #eee; }
.rec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 30px; }

/* FOOTER */
#main-footer { background: #111; color: #fff; padding: 60px 0 20px; margin-top: 80px; }
.footer-top { display: flex; justify-content: space-between; margin-bottom: 30px; }
.footer-brand p { color: #aaa; font-size: 0.9rem; max-width: 300px; margin-top: 10px; }
.footer-links-group { display: flex; gap: 60px; }
.col h4 { margin-bottom: 20px; font-size: 0.9rem; letter-spacing: 1px; }
.col ul { list-style: none; padding: 0; }
.col a { color: #aaa; text-decoration: none; font-size: 0.85rem; line-height: 2; }
.footer-bottom { text-align: center; border-top: 1px solid #333; padding-top: 20px; font-size: 0.8rem; color: #666; }

/* MOBILE */
@media screen and (max-width: 768px) {
    .cart-layout { grid-template-columns: 1fr; gap: 30px; }
    .cart-header-row { display: none; } /* Hide headers on mobile */
    .rec-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-top { flex-direction: column; gap: 40px; }
    
    .cart-item { align-items: flex-start; }
    .qty-control { justify-content: flex-start; margin-top: 10px; }
    .item-total { text-align: left; margin-top: 10px; }
}