/* =========================================
   1. GLOBAL & RESET
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #FFFBFC;
    overflow-x: hidden;
    padding-top: 10px; /* Compensate for fixed header */
}

body.menu-is-open {
    overflow: hidden;
}


/* Ensure images don't overflow */
img {
    max-width: 100%;
    display: block;
}

/* =========================================
   2. HEADER / NAVBAR STYLES (Desktop)
   ========================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 64px;
    background-color: #FFFBFC;
    z-index: 1000;
    box-sizing: border-box;
}

.branding-row { 
    position: static; 
    width: 100%;
    display: flex;
    align-items: center;
}

.logo-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.logo-container img {
    height: 145px;
    width: auto;
    display: block;
}

.nav-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: clamp(300px, 25vw, 450px);
}

.nav-links {
    flex: 1;
    display: flex;
    align-items: center;
}

.nav-left { justify-content: space-evenly; }
.nav-right { justify-content: space-between; }

.nav-links a {
    text-decoration: none;
    color: #C24072;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0;
}

.icon-btn img { 
    height: 24px; 
    width: auto; 
}

.header-actions-mobile,
.mobile-menu-overlay,
.menu-backdrop { 
    display: none; 
}

/* =========================================
   3. CART POPUP / DRAWER STYLES
   ========================================= */
.cart-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cart-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 481px;
    
    /* FIX 1: Use dvh (dynamic height) to avoid address bar issues, fallback to vh */
    height: 100vh;
    height: 100dvh; 
    
    background: #FFFBFC;
    z-index: 1002;
    transition: right 0.4s ease;
    
    /* FIX 2: Add padding-bottom that respects the device safe area (the bottom bar) */
    padding: 44px 25px;
    padding-bottom: calc(44px + env(safe-area-inset-bottom)); 
    
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}

.cart-drawer.is-open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-shrink: 0;
}

.cart-title {
    color: #762043;
    font-size: 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin: 0;
}

.close-cart-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: #762043;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

/* Cart Items Area */
.cart-items-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 20px;
    padding-right: 5px; 
}

.cart-empty-msg {
    text-align: center;
    color: #666;
    margin-top: 50px;
    font-size: 16px;
}

.cart-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.cart-item-img {
    width: 100px;
    height: 133px;
    border-radius: 5px;
    object-fit: cover;
    background-color: #eee;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    display: flex;
    justify-content: space-between;
}

.cart-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 180px;
}

.cart-item-name {
    color: black;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.cart-item-meta {
    color: black;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.8;
}

.cart-color-circle {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #ddd;
    margin-left: 6px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.cart-price-actions {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    min-height: 133px;
}

.cart-item-price {
    color: #762043;
    font-size: 16px;
    font-weight: 500;
}

.cart-item-view {
    color: black;
    font-size: 16px;
    text-decoration: underline;
    cursor: pointer;
}

/* =========================================
   CART FOOTER & BUTTONS
   ========================================= */
.cart-footer {
    border-top: 1px solid #eee;
    padding-top: 20px;
    flex-shrink: 0;
    /* Ensure the footer sits above the bottom padding of the drawer */
    margin-bottom: env(safe-area-inset-bottom);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.total-label, .total-amount {
    color: black;
    font-size: 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px; 
    width: 100%;
}

.btn-cart {
    flex: 1; 
    height: 46px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    font-size: 16px; 
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    white-space: nowrap; 
    padding: 0 10px; 
}

.btn-outline {
    outline: 2px solid #C43670;
    outline-offset: -2px;
    color: #C43670;
    background: transparent;
    border: none;
    font-weight: 600;
}

.btn-solid {
    background: #C43670;
    color: #FFFBFC;
    border: none;
    font-weight: 500;
}

/* =========================================
   MOBILE ADJUSTMENT
   ========================================= */
@media (max-width: 900px) {
    .cart-actions {
        flex-direction: column; 
        gap: 15px;
    }

    .btn-cart {
        width: 100%;
        flex: none; 
    }
}

/* =========================================
   4. MOBILE RESPONSIVENESS (900px and below)
   ========================================= */
@media (max-width: 900px) {
    .site-header {
        height: 60px;
        padding: 0 20px; 
        display: flex;
        align-items: center;
    }

    body { padding-top: 80px; } 

    .nav-container { display: none; }

    .branding-row {
        justify-content: space-between;
        align-items: center;
        width: 100%;
        height: 100%;
    }

    .logo-container {
        position: absolute; 
        top: 0;
        left: 20px;
        transform: none;
    }

    .logo-container img { 
        height: 80px; 
        margin-left: -15px;
        display: block;
    }

    .header-actions-mobile {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-left: auto;
    }

    .hamburger-menu {
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hamburger-menu img { 
        height: 24px; 
        width: auto;
    }

    .mobile-menu-overlay {
        display: flex;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        z-index: 999;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        background-color: #FBD9E5;
        padding: 0 16px;
        flex-direction: column;
        box-sizing: border-box;
    }

    .menu-backdrop {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s;
    }

    .mobile-menu-overlay.is-open {
        max-height: 100vh;
        padding-top: 27px;
        padding-bottom: 27px;
    }

    .menu-backdrop.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-nav-links .menu-link {
        text-decoration: none;
        color: #3B1022;
        font-size: 1.4rem;
        font-weight: 600;
        padding: 15px 0;
        display: block;
    }

    /* FIX 3: MORE PADDING FOR MOBILE CART */
    .cart-drawer {
        width: 100%;
        right: -100%;
        /* Add significant bottom padding for mobile browsers */
        padding-top: 20px;
        padding-left: 20px;
        padding-right: 20px;
        /* Base 40px padding + Safe Area Inset */
        padding-bottom: calc(40px + env(safe-area-inset-bottom));
    }
}

/* =========================================
   CART BADGE STYLES (New)
   ========================================= */
/* Ensure the button can hold the absolute positioned badge */
.icon-btn {
    position: relative; 
}

.cart-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #C43670; /* Brand Pink */
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #FFFBFC; /* White border to separate from icon */
    pointer-events: none; /* Let clicks pass through to the button */
    padding: 0 4px; /* Handling double digits */
    box-sizing: border-box;
}


/* =========================================
   CART PAGE STYLES
   ========================================= */

/* Wrapper to push content down from fixed header */
.cart-page-wrapper {
    padding-top: 150px; /* Adjust based on your header height */
    padding-bottom: 80px;
    max-width: 1300px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* --- Page Title --- */
.page-title {
    text-align: center;
    font-family: 'Poppins', sans-serif;
    color: #762043;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
}

/* =========================================
   PROGRESS BAR RECODE
   ========================================= */

.checkout-progress {
    display: flex;
    justify-content: center; /* Keeps the whole group centered on page */
    align-items: flex-start; /* Aligns tops of icons/lines */
    width: 100%;
    margin: 0 auto 60px auto; 
    padding: 0 20px; /* Prevents touching edges on small screens */
    box-sizing: border-box;
}

/* --- The Step Container (Icon + Text) --- */
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2; /* Keeps icon above the line visually */
    width: 120px; /* Fixed width ensures labels don't shift layout */
}

/* --- The Icon Circle --- */
.step-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #F5F5F5;
    color: #999;
    
    /* Center the icon inside the circle */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    
    /* Smooth transition for hover effects */
    transition: all 0.3s ease;
}

/* --- The Text Label --- */
.step-label {
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #999;
    text-align: center;
    line-height: 1.2;
}

/* --- The Connecting Line --- */
.step-line {
    /* THIS IS THE KEY TO EVEN SPACING */
    width: 100px; /* Sets the exact gap distance */
    height: 3px;
    background-color: #E0E0E0;
    
    /* Math: Icon is 60px. Center is 30px. Line is 3px. 
       30px - 1.5px = 28.5px. Round to 29px. */
    margin-top: 29px; 
    
    /* Remove default shrink so it stays 100px */
    flex-shrink: 0; 
}

/* --- Active / Finished States (Pink) --- */
.step.active .step-icon,
.step.finished .step-icon {
    background-color: #FBD9E5;
    color: #C43670;
}

.step.active .step-label,
.step.finished .step-label {
    color: #C43670;
}

.step-line.finished {
    background-color: #C43670;
}

/* =========================================
   MOBILE ADJUSTMENTS (Under 768px)
   ========================================= */
@media (max-width: 768px) {
    /* Shrink the gap line so it fits on phones */
    .step-line {
        width: 40px; 
    }
    
    /* Allow text to wrap tighter */
    .step {
        width: auto; 
        min-width: 80px;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .step-icon {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    /* Re-center line based on new 50px icon height (25px center) */
    .step-line {
        margin-top: 24px;
    }
}
/* --- Layout Grid --- */
.cart-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.cart-items-section {
    flex: 2; /* Takes up 2/3 space */
}

.cart-summary-section {
    flex: 1; /* Takes up 1/3 space */
    max-width: 400px;
}

/* --- Cart Items Table --- */
.cart-header-row {
    display: grid;
    /* Grid columns match the design: Edit(narrow) Product(wide) Price Qty Subtotal */
    grid-template-columns: 50px 2fr 1fr 1.2fr 1fr; 
    padding: 0 20px 15px 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #1C1B1F;
}

.cart-item-card {
    background: #FFFFFF;
    border: 1px solid #F0F0F0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 50px 2fr 1fr 1.2fr 1fr;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

/* Column Alignments */
.col-edit, .col-qty { display: flex; align-items: center; }
.col-price, .col-subtotal { font-size: 1.1rem; color: #1C1B1F; }
.col-subtotal { font-weight: 600; }

/* Edit / Trash Icon */
.trash-btn {
    background: none;
    border: none;
    color: #A64D6A;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}
.trash-btn:hover { color: #C43670; }

/* Product Info */
.product-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.product-img {
    width: 100px;
    height: 80px;
    
    background: #9e9e9e; /* The grey box from design */
    border-radius: 4px;
    flex-shrink: 0;
}

.product-details h4 {
    font-size: 0.9rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.product-details p {
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 2px;
}

/* Quantity Selector */
.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid #C43670;
    border-radius: 4px;
    padding: 2px 5px;
    width: 100px;
    justify-content: space-between;
}

.qty-selector button {
    background: none;
    border: none;
    color: #C43670;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 5px;
}

.qty-selector input {
    width: 30px;
    text-align: center;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #C43670;
    font-size: 1rem;
    outline: none;
}

/* --- Order Summary Card --- */
.summary-card {
    background: #FFFFFF;
    border: 1px solid #FBD9E5; /* Light pink border */
    border-radius: 8px;
    padding: 30px;
    font-family: 'Poppins', sans-serif;
    min-height: 400px; /* To match height in image */
    display: flex;
    flex-direction: column;
}

.summary-card h3 {
    color: #762043;
    margin-bottom: 25px;
    font-weight: 700;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: #1C1B1F;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.summary-total-area {
    flex-grow: 1; /* Pushes total to bottom */
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #1C1B1F;
}

.checkout-btn {
    background-color: #C43670;
    color: white;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.checkout-btn:hover {
    background-color: #9e2a5a;
}

/* =========================================
   RESPONSIVE (Mobile)
   ========================================= */
@media (max-width: 900px) {
    .cart-container {
        flex-direction: column;
    }
    
    .cart-summary-section {
        max-width: 100%;
        width: 100%;
    }

    /* Hide table headers on mobile */
    .cart-header-row { display: none; }

    /* Stack card contents */
    .cart-item-card {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
        position: relative;
    }

    .col-edit {
        position: absolute;
        top: 10px;
        left: 10px;
    }

    .product-info {
        flex-direction: column;
    }

    .qty-selector { margin: 0 auto; }
    
  
}

/* Update this class in your CSS */
.product-img {
    width: 100px;
    height: 80px;
    background-color: #eee;
    background-size: cover;      /* Added */
    background-position: center; /* Added */

    border-radius: 4px;
    flex-shrink: 0;
}

/* Optional: Message when cart is empty */
.empty-msg {
    text-align: center;
    padding: 20px;
    color: #762043;
    font-size: 1.2rem;
}


/* Color Circle Style */
.color-circle {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #ccc; /* Light border so white colors are visible */
    vertical-align: middle;
    margin-left: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Helper to align the text "Color:" with the circle */
.detail-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
    font-size: 0.8rem;
    color: #555;
}

/* =======================
   3. FOOTER STYLES
   ======================= */
.site-footer {
    background-color: #FBD9E5; /* Light Pink Background */
    padding: 25px 0px 30px 0px;
    color: #762043; /* Dark Pink Text */
    font-family: 'Poppins', sans-serif;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 60px;
    margin-bottom: 60px;
    margin-left: 70px;
    margin-right: 70px;
}

/* --- Left Column (Newsletter) --- */
.footer-left {
    flex: 1;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-logo img {
    height: 80px; 
    width: auto;
    margin-bottom: 10px;
}

.newsletter-text {
    font-size: 16px;
    line-height: 1.5;
    max-width: 450px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.newsletter-input {
    flex: 1;
    height: 46px;
    min-width: 250px;
    background: rgba(236, 131, 158, 0.29); /* Semi-transparent pink */
    border: none;
    border-radius: 8px;
    padding: 0 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: #762043;
    outline: none;
}

.newsletter-input::placeholder {
    color: rgba(58, 16, 33, 0.5);
    font-weight: 500;
}

.subscribe-btn {
    height: 46px;
    padding: 0 35px;
    background-color: #C43670; /* Brand Pink */
    color: #FFFBFC;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.subscribe-btn:hover {
    background-color: #a02c5b;
}

.privacy-text {
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.8;
    max-width: 500px;
    margin-top: 10px;
}

/* --- Right Column (Links) --- */
.footer-right {
    display: flex;
    gap: 80px;
    margin-top: 40px;
}

.footer-column h4 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 25px;
    color: #1C1B1F; /* Black/Dark Grey headings as per image */
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-column a {
    text-decoration: none;
    color: #1C1B1F;
    font-size: 16px;
    font-weight: 400;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: #C43670;
}

/* --- Bottom Bar --- */
.footer-bottom {
    border-top: 1px solid #C43670;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-left: 40px;
    margin-right: 40px;
}

.copyright, .footer-legal a {
    font-size: 14px;
    color: #C43670;
}

.footer-legal {
    display: flex;
    gap: 25px;
}

.footer-legal a:hover {
    text-decoration: underline;
}

/* Footer Media Query */
@media (max-width: 900px) {
    .site-footer {
        padding: 25px 20px 40px 20px;
    }

    .footer-content {
        margin: 0;
        flex-direction: column;
        gap: 40px;
    }

    .footer-left {
        max-width: 100%;
        gap: 10px;
    }

    .footer-logo img {
        height: 60px;
        margin-bottom: 10px;
    }

    .newsletter-text {
        font-size: 16px;
        line-height: 1.5;
        max-width: 100%;
        margin-bottom: 15px;
        color: #762043;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .newsletter-input {
        width: 100%;
        height: 55px;
        background-color: rgba(236, 131, 158, 0.25); 
        border: 1px solid transparent;
        border-radius: 8px;
        padding: 10px 20px;
        font-family: 'Poppins', sans-serif;
        font-size: 16px;
        color: #762043;
        outline: none;
        transition: border 0.3s ease, background 0.3s ease;
    }

    .newsletter-input::placeholder {
        color: #9E5A75;
        opacity: 0.8;
    }

    .newsletter-input:focus {
        background-color: rgba(255, 255, 255, 0.4);
        border: 1px solid #C43670;
    }

    .subscribe-btn {
        width: 100%;
        height: 45px;
        border-radius: 8px;
        font-size: 18px;
        font-weight: 500;
        margin-top: 5px;
    }

    .privacy-text {
        font-size: 13px;
        color: #762043;
        margin-top: 5px;
        opacity: 0.9;
    }

    .footer-right {
        margin-top: 20px;
        display: flex;
        justify-content: space-between;
        gap: 20px;
        width: 100%;
    }

    .footer-column h4 {
        font-size: 20px;
        color: #762043;
        margin-bottom: 20px;
    }

    .footer-column a {
        color: #762043;
        font-size: 16px;
    }

    .footer-bottom {
        margin: 40px 0 0 0;
        padding-top: 20px;
        border-top: 1px solid rgba(196, 54, 112, 0.2);
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .copyright {
        font-size: 13px;
        color: #C43670;
    }

    .footer-legal {
        display: flex;
        justify-content: center;
        gap: 20px;
        flex-wrap: wrap;
    }

    .footer-legal a {
        font-size: 13px;
        text-decoration: underline;
        color: #C43670;
    }
}




/* =========================================
   CENTER PART RESPONSIVE (Cart Page)
   ========================================= */

/* --- Tablet & Small Laptop (1200px down) --- */
@media (max-width: 1200px) {
    .cart-page-wrapper {
        padding-left: 15px;
        padding-right: 15px;
    }
    .cart-container { gap: 20px; }
    
    /* Slight squeeze for tablet */
    .cart-header-row, .cart-item-card {
        grid-template-columns: 40px 2fr 0.8fr 1.2fr 0.8fr; 
    }
}

/* --- Mobile Layout (900px down) --- */
@media (max-width: 900px) {

    /* 4. COMPACT MOBILE CARD (Fixed Positioning) */
    .cart-header-row { display: none; } /* Hide headers */

    .cart-item-card {
        display: flex;
        flex-direction: column;
        /* This makes the card the "anchor" for the icon */
        position: relative !important; 
        padding: 15px;
        gap: 15px;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0,0,0,0.03);
        border: 1px solid #f0f0f0;
        border-radius: 8px;
        isolation: isolate; /* Creates a new stacking context */
    }

    /* --- A. Delete Button (Strictly Top Right) --- */
    .col-edit {
        position: absolute !important;
        top: 10px;
        right: 10px;
        left: auto !important; /* Forces it away from the left/image side */
        
        width: 40px; /* restrict width so it doesn't span the card */
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10; /* Ensures it sits ABOVE everything */
    }

    .trash-btn {
        font-size: 1.2rem;
        color: #A64D6A;
        background: white; /* Optional: adds a small backing to ensure visibility */
        border-radius: 50%; /* Optional: circular touch target */
        padding: 5px;
        cursor: pointer;
    }

    /* --- B. Top Section: Image + Text --- */
    .product-info {
        display: flex;
        flex-direction: row; 
        align-items: flex-start;
        width: 100%;
        /* Important: Add right padding so text never overlaps the trash icon */
        padding-right: 40px; 
        gap: 15px;
        z-index: 1;
    }

    /* 1. Page Spacing & Title */
    .cart-page-wrapper {
        padding-top: 10px;
        padding-bottom: 40px;
    }

    .page-title {
        font-size: 24px;
        margin-bottom: 20px;
    }


   
  

    /* 3. Main Container Layout */
    .cart-container {
        flex-direction: column;
    }

    .cart-items-section, 
    .cart-summary-section {
        width: 100%;
    }

    /* 4. COMPACT MOBILE CARD */
    .cart-header-row { display: none; } /* Hide headers */

    .cart-item-card {
        display: flex;
        flex-direction: column;
        position: relative; /* Anchor for the absolute trash icon */
        padding: 15px;
        gap: 15px;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0,0,0,0.03);
        border: 1px solid #f0f0f0;
        border-radius: 8px;
    }

    /* --- A. Delete Button (Top Right) --- */
    .col-edit {
        position: absolute;
        top: 12px;
        right: 12px;
        width: auto;
        height: auto;
        z-index: 5; /* Ensure it's clickable */
    }

    .trash-btn {
        font-size: 1.2rem;
        color: #A64D6A;
        padding: 5px; /* Larger touch target */
    }

    /* --- B. Top Section: Image + Text --- */
    .product-info {
        display: flex;
        flex-direction: row; /* Side-by-side layout */
        align-items: flex-start;
        width: 100%;
        /* Add padding right so text doesn't hit the delete button */
        padding-right: 40px; 
        gap: 15px;
    }

    .product-img {
        width: 70px;  /* Compact size */
        height: 70px;
        margin-bottom: 0;
        border-radius: 6px;
    }

    .product-details {
        text-align: left;
    }
    
    .product-details h4 {
        font-size: 0.95rem;
        margin-bottom: 5px;
        line-height: 1.3;
        color: #333;
    }

    /* --- C. Bottom Section: Qty + Subtotal --- */
    /* Hide Unit Price column to save space */
    .col-price { display: none; }

    .col-qty {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid #f7f7f7;
        padding-top: 15px;
        margin-top: 5px;
    }

    .qty-selector {
        height: 36px;
        width: 110px;
    }

    .col-subtotal {
        font-size: 1.1rem;
        color: #C43670;
        font-weight: 700;
    }
    
    /* 5. Summary Section */
    .summary-card {
        padding: 25px 20px;
        margin-top: 10px;
    }
}

/* --- Extra Small Mobile Tweaks --- */
@media (max-width: 380px) {
    .step-label { font-size: 0.65rem; }
    .product-img { width: 60px; height: 60px; }
}




.checkout-progress .step {
    cursor: pointer;
    transition: transform 0.2s ease;
}

/* Optional: nice hover effect */
.checkout-progress .step:hover {
    transform: scale(1.05);
}