/* =================== CART PAGE STYLING =================== */

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #fdfcfc;
    color: #333;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #111;
    position: static;
    color: white;
    z-index: 1000;
}

header .logo {
    font-size: 1.5rem;
    font-weight: bold;
}

header nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

header nav a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s;
}

header nav a:hover {
    color: #f5b301;
}

.logo {
    height: 100px;
    width: auto;
    object-fit: contain;
    display: block;
    margin: 0;
    border-radius: 50%;
    padding: 1px 0;
}

#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: pink;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

#splash-screen.hidden {
    display: none;
}


/* Cart Container */

.cart-container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


/* Table Layout */

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
}

.cart-table thead {
    background-color: #d3af37;
    border-bottom: 2px solid #e0e0e0;
}

.cart-table th,
.cart-table td {
    text-align: left;
    padding: 16px 12px;
    font-size: 15px;
    vertical-align: middle;
}

.cart-table th {
    font-weight: 900;
    font-size: 25px;
    color: #000000;
}

.cart-table td img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 10px;
}

.cart-product {
    display: flex;
    align-items: center;
}


/* Quantity Controls */

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-controls button {
    width: 32px;
    height: 32px;
    border: none;
    background-color: #eee;
    color: #333;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quantity-controls button:hover {
    background-color: #d3d3d3;
}

.quantity-number {
    min-width: 24px;
    text-align: center;
}


/* Color Dropdown */

.color-select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fafafa;
    font-size: 14px;
}


/* Remove Button */

.remove-btn {
    background: transparent;
    border: none;
    color: #e74c3c;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s ease;
}

.remove-btn:hover {
    background-color: #c0392b;
    color: #f9f7f7;
}


/* Cart Summary */

.cart-summary {
    text-align: right;
    margin-top: 30px;
    font-size: 18px;
}

#order-btn {
    background-color: #222;
    color: white;
    border: none;
    padding: 12px 28px;
    font-size: 16px;
    margin-top: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s ease;
}

#order-btn:hover {
    background-color: #444;
}


/* Toast Styling */

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #222;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    opacity: 1;
    transition: opacity 0.5s ease;
    z-index: 1000;
}

.toast.error {
    background-color: #e74c3c;
}

.bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    body,
    html {
        font-family: 'Segoe UI', sans-serif;
        height: 100%;
        font-family: 'Arial', sans-serif;
        padding-bottom: 80px
    }
    body {
        overflow-x: hidden;
        background: linear-gradient(to right, #fffaef, #dbd8d2);
        -ms-overflow-style: none;
        /* IE and Edge */
        scrollbar-width: none;
        margin: 0;
        font-family: 'Segoe UI', sans-serif;
        background: #f9f7f3;
        font-family: 'Segoe UI', sans-serif;
        background: #fdfaf5;
        padding-bottom: 100px;
        /* space for nav + pay button */
        /* Firefox */
    }
    /* Hide scrollbar but allow scroll */
     ::-webkit-scrollbar {
        display: none;
    }
    header {
        display: none;
    }
    body {
        margin: 0;
        font-family: 'Segoe UI', sans-serif;
        background: #fdfaf5;
        padding-bottom: 120px;
        /* ✅ enough space for nav + pay btn */
        overflow-x: hidden;
    }
    .cart-count-badge {
        position: absolute;
        top: -5px;
        right: -10px;
        background: red;
        color: white;
        font-size: 11px;
        font-weight: bold;
        padding: 2px 6px;
        border-radius: 50%;
        z-index: 10;
        animation: bounceBadge 0.4s ease-in-out;
    }
    .cart-link {
        position: relative;
    }
    @keyframes bounceBadge {
        0% {
            transform: scale(1) translate(50%, -50%);
        }
        50% {
            transform: scale(1.3) translate(50%, -50%);
        }
        100% {
            transform: scale(1) translate(50%, -50%);
        }
    }
    .cart-container {
        padding: 12px;
        min-height: 100vh;
    }
    .cart-container h1 {
        font-size: 15px;
        margin-bottom: 10px;
        font-weight: 600;
    }
    .cart-table {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .cart-table thead {
        display: none;
        /* ✅ hide on mobile */
    }
    .cart-table tbody tr {
        display: flex;
        flex-direction: column;
        background: white;
        border-radius: 8px;
        padding: 10px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
        gap: 6px;
    }
    .cart-product {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .cart-product-img {
        width: 42px;
        height: 42px;
        object-fit: cover;
        border-radius: 6px;
    }
    .Productcell {
        display: flex;
        flex-direction: column;
    }
    .Productcell span:first-child {
        font-size: 12px;
        font-weight: 600;
        color: #111;
        line-height: 1.2;
    }
    .Productcell span:last-child {
        font-size: 11px;
        font-weight: 400;
        color: #777;
        line-height: 1.2;
        margin-top: 2px;
    }
    .quantity-controls {
        display: flex;
        gap: 6px;
        align-items: center;
        margin-top: 4px;
    }
    .quantity-controls button {
        padding: 2px 6px;
        background: #eee;
        border: none;
        border-radius: 4px;
        font-size: 12px;
        cursor: pointer;
    }
    .quantity-number {
        font-size: 12px;
        font-weight: 500;
    }
    .color-select {
        padding: 3px 6px;
        font-size: 11px;
        border-radius: 4px;
        border: 1px solid #ccc;
        margin-top: 4px;
    }
    td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 0;
    }
    .remove-btn {
        background: transparent;
        color: red;
        font-size: 14px;
        border: none;
        cursor: pointer;
        align-self: flex-end;
        margin-top: -4px;
    }
    /* Toast */
    #toast-container {
        position: fixed;
        bottom: 90px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 9999;
    }
    .toast {
        background: #222;
        color: #fff;
        padding: 6px 12px;
        border-radius: 16px;
        font-size: 11px;
        margin-top: 6px;
        opacity: 1;
        transition: 0.3s;
    }
    .toast.success {
        background: #2e7d32;
    }
    .toast.error {
        background: #c62828;
    }
    /* Cart Summary Floating */
    .cart-summary {
        position: fixed;
        bottom: 60px;
        /* just above bottom nav */
        left: 0;
        width: 100%;
        background: #fff;
        padding: 10px 16px;
        border-top: 1px solid #ddd;
        z-index: 999;
        box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.05);
    }
    .cart-summary p {
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 8px;
    }
    #order-btn {
        width: 100%;
        padding: 10px;
        font-size: 13px;
        background: #331100;
        color: #fff;
        border: none;
        border-radius: 8px;
        cursor: pointer;
    }
    #order-btn:hover {
        background: #000;
    }
    /* Bottom Navigation */
    .bottom-nav {
        display: block;
        position: fixed;
        bottom: 0;
        width: 100%;
        background: black;
        display: flex;
        justify-content: space-around;
        padding: 8px 0;
        z-index: 1000;
        border-top: 1px solid #333;
    }
    .bottom-nav a {
        color: #eee;
        font-size: 11px;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        transition: 0.3s ease;
    }
    .bottom-nav a.active-nav {
        background-color: #fff;
        color: #000;
        padding: 4px 10px;
        border-radius: 20px;
        transform: translateY(-6px);
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    }
}