/* 
    Jewel Nails - Premium Modern Cart (Reference Match)
    Clean, high-fidelity design with Rose Gold accents
*/

:root {
    --color-pink: #d1a69a;      /* Antique Rose */
    --color-pink-light: #fdf6f4;
    --color-pink-dark: #b88679;
    --color-success: #10b981;
    --color-text: #111827;
    --color-muted: #6b7280;
    --color-border: #f3f4f6;
    --radius-main: 12px;
}

.cart-page-wrapper {
    background: #fcfaf8;
    padding: 60px 0 100px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--color-text);
}

.cart-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Section */
.cart-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.title-group h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.item-count-badge {
    background: #ffe4e6;
    color: #e11d48;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 50px;
    font-weight: 700;
}

.title-group p {
    color: var(--color-muted);
    font-size: 0.95rem;
}

.btn-continue-top {
    color: var(--color-pink);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.btn-continue-top:hover {
    color: var(--color-pink-dark);
}

/* Layout Grid */
.cart-layout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

/* Left Card: Items */
.cart-items-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-main);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.cart-table-header {
    display: grid;
    grid-template-columns: 3.5fr 1fr 1fr 1fr 40px;
    padding: 20px 30px;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.75rem;
    font-weight: 800;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-label.center { text-align: center; }

/* Item Rows */
.cart-item-row {
    display: grid;
    grid-template-columns: 3.5fr 1fr 1fr 1fr 40px;
    padding: 30px;
    border-bottom: 1px solid var(--color-border);
    align-items: center;
}

.product-cell {
    display: flex;
    gap: 20px;
    align-items: center;
}

.product-img-box {
    width: 100px;
    height: 100px;
    background: #f9fafb;
    border-radius: 10px;
    overflow: hidden;
    padding: 5px;
}

.product-img-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.variant-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.variant-label {
    font-size: 0.75rem;
    color: var(--color-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.variant-value {
    font-size: 0.85rem;
    color: var(--color-text);
    font-weight: 700;
}

.tags-group {
    display: flex;
    gap: 10px;
}

.tag {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
}

.tag-pink { background: #fdf2f2; color: #9b1c1c; }
.tag-purple { background: #f5f3ff; color: #5b21b6; }

.price-cell, .total-cell {
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
}

/* Qty Control */
.qty-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 5px;
    width: 110px;
    margin: 0 auto;
}

.qty-pill button {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--color-muted);
}

.qty-pill span {
    flex: 1;
    text-align: center;
    font-weight: 800;
    font-size: 0.95rem;
}

.btn-remove-item {
    background: none;
    border: none;
    color: #e11d48;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.3s;
}

.btn-remove-item:hover {
    color: #be123c;
    transform: scale(1.1);
}

/* Bottom Actions */
.cart-bottom-actions {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wishlist-link {
    color: #e11d48;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-update-cart {
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Summary Card */
.cart-summary-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-main);
    padding: 30px;
}

.summary-heading {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 25px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: var(--color-muted);
}

.summary-line.discount { color: var(--color-success); font-weight: 700; }
.summary-line.total { 
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text);
}

.total-lbl { font-size: 1.1rem; font-weight: 800; }
.total-val { font-size: 1.8rem; font-weight: 900; }


.savings-banner {
    background: #ecfdf5;
    color: var(--color-success);
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-checkout-main {
    width: 100%;
    background: #e11d48 !important;
    color: #fff !important;
    border: none;
    padding: 18px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    visibility: visible !important;
    opacity: 1 !important;
}

.btn-checkout-main:hover {
    background: #be123c;
    transform: translateY(-2px);
}

.secure-label {
    text-align: center;
    margin-top: 15px;
    font-size: 0.8rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Shipping Progress Box */
.shipping-box {
    margin-top: 30px;
    background: #fdf2f2;
    padding: 20px;
    border-radius: var(--radius-main);
}

.shipping-header {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.shipping-header i { color: #e11d48; font-size: 1.2rem; }
.shipping-header div h5 { font-size: 0.85rem; font-weight: 800; margin-bottom: 2px; }
.shipping-header div p { font-size: 0.75rem; color: var(--color-muted); }

.progress-container {
    height: 6px;
    background: #fee2e2;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: #e11d48;
    width: 100%;
}

.shipping-footer {
    font-size: 0.75rem;
    color: var(--color-muted);
    transition: 0.3s;
}

.shipping-footer.unlocked {
    color: #10b981;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shipping-footer.unlocked::before {
    content: '🎉';
}

/* Footer Trust Icons */
.trust-icons-bar {
    margin-top: 60px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-main);
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    padding: 25px 10px !important;
    gap: 0;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    justify-content: center;
    text-align: left;
}

.trust-item:not(:last-child) {
    border-right: 1px solid var(--color-border);
}

.trust-icon {
    width: 45px;
    height: 45px;
    background: #fdf2f8;
    color: #db2777;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.trust-info h5 { font-size: 0.85rem; font-weight: 800; margin-bottom: 2px; }
.trust-info p { font-size: 0.75rem; color: var(--color-muted); }

/* Mobile Responsive */
@media (max-width: 1100px) {
    .cart-layout-grid { grid-template-columns: 1fr; }
    .trust-icons-bar { grid-template-columns: repeat(2, 1fr); }
    .trust-item:nth-child(2) { border-right: none; }
}

@media (max-width: 768px) {
    .cart-page-wrapper {
        padding-top: 20px !important; /* Reduced from 60px to move content up */
    }

    .cart-header-top { 
        flex-direction: column !important; 
        gap: 5px !important; /* Reduced gap between elements */
        align-items: stretch !important;
        margin-bottom: 20px !important; /* Reduced margin below header */
    }

    .btn-continue-top {
        align-self: flex-end !important;
        font-size: 11px !important;
        order: -1; /* Move it to the top right of the container */
    }

    .title-group h1 {
        font-size: 1.4rem !important;
        gap: 10px !important;
        margin-bottom: 5px !important;
    }

    .item-count-badge {
        font-size: 9px !important;
        padding: 2px 8px !important;
        margin-top: 0 !important; /* Remove top margin */
        background: #fff !important;
        border: 1px solid #e11d48 !important;
        color: #e11d48 !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        font-weight: 800 !important;
        height: fit-content !important;
    }

    .cart-table-header { display: none; }
    
    .cart-container {
        padding: 0 !important;
    }

    .cart-header-top { 
        padding: 0 15px !important;
        margin-bottom: 15px !important;
    }

    .cart-items-card {
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .cart-item-row { 
        display: grid !important;
        grid-template-columns: 100px 1fr !important;
        grid-template-areas: 
            "img info"
            "img price"
            "qty total"
            "action action" !important;
        padding: 15px !important;
        gap: 8px !important;
        background: #fff !important;
        border-bottom: 8px solid #f0f0f0 !important; 
        position: relative !important;
        width: 100% !important;
    }
    
    .product-cell { 
        display: contents !important; 
    }

    .product-img-box {
        grid-area: img !important;
        width: 85px !important;
        height: 85px !important;
        border: 1px solid #f0f0f0 !important;
        border-radius: 4px !important;
        margin: 0 auto !important;
    }

    .product-info {
        grid-area: info !important;
        text-align: left !important;
        padding-bottom: 0 !important;
    }

    .product-info h4 {
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        color: #212121 !important;
        margin-bottom: 2px !important;
    }

    .product-info .size-label {
        font-size: 0.8rem !important;
        color: #878787 !important;
    }

    .tags-group {
        display: flex !important;
        gap: 5px !important;
        margin: 4px 0 !important;
    }

    .tag {
        font-size: 8px !important;
        padding: 2px 6px !important;
        background: #f1f1f1 !important;
        color: #26a541 !important; 
        font-weight: 700 !important;
    }

    /* Price directly under info */
    .price-cell {
        grid-area: price !important;
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        color: #111 !important;
        display: flex !important;
        align-items: center !important;
        gap: 5px !important;
        margin-top: -5px !important;
    }

    .price-cell::before { content: 'Price:'; font-size: 0.75rem; color: #888; font-weight: 400; }

    /* Qty & Total on bottom row */
    .qty-cell {
        grid-area: qty !important;
        display: flex !important;
        justify-content: center !important;
        padding-top: 12px !important;
    }

    .qty-pill { 
        width: 100px !important;
        height: 30px !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 3px !important;
        background: #fff !important;
        display: flex !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .qty-pill button {
        width: 32px !important;
        height: 100% !important;
        font-size: 1.1rem !important;
        color: #212121 !important;
        background: #fff !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
    }

    .qty-pill span {
        flex: 1 !important;
        height: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #212121 !important;
        border-left: 1px solid #e0e0e0 !important;
        border-right: 1px solid #e0e0e0 !important;
        background: #fff !important;
        min-width: 30px !important;
    }

    .qty-pill button:active {
        background: #f1f1f1 !important;
    }

    .total-cell {
        grid-area: total !important;
        font-size: 0.85rem !important;
        color: #e11d48 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 5px !important;
        padding-right: 10px !important;
    }

    .total-cell::before { content: 'Subtotal:'; font-size: 0.75rem; }

    /* Action Bar at Bottom */
    .action-cell {
        grid-area: action !important;
        display: flex !important;
        border-top: 1px solid #f0f0f0 !important;
        margin-top: 10px !important;
        padding-top: 10px !important;
    }

    .btn-remove-item {
        width: 100% !important;
        position: static !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        color: #e11d48 !important;
        font-size: 0.9rem !important;
        font-weight: 500 !important;
        text-transform: capitalize !important;
        background: transparent !important;
        border: none !important;
    }

    .btn-remove-item i {
        color: #e11d48 !important;
    }

    .btn-remove-item::after {
        content: 'Remove';
        color: #e11d48 !important;
    }

    .cart-bottom-actions {
        padding: 15px !important;
        background: #fff !important;
        border-top: 1px solid #f0f0f0 !important;
    }
    .cart-bottom-actions {
        padding: 15px !important;
        background: #fff !important;
        border-top: 1px solid #f0f0f0 !important;
        flex-direction: row !important;
        justify-content: space-between !important;
    }

    .wishlist-link, .btn-update-cart {
        font-size: 10px !important;
        padding: 6px 10px !important;
    }
    
    .trust-icons-bar { 
        grid-template-columns: 1fr !important; 
        padding: 10px 20px !important; 
        gap: 0 !important;
        margin-top: 30px !important;
    }

    .trust-item { 
        border-right: none !important; 
        border-bottom: 1px solid #f0f0f0 !important; 
        padding: 15px 0 !important; 
        justify-content: flex-start !important;
        width: 100% !important;
    }

    .trust-item:last-child { border-bottom: none !important; }

    .cart-summary-card {
        padding: 20px !important;
    }

    .total-val {
        font-size: 1.5rem !important;
    }
}
