
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 16px;
    background: #f5f7fa;
    font-family: Arial, sans-serif;
    color: #202b3c;
}

/* Cart item card */
.css-item-container {
    display: flex;
    align-items: center;
    gap: 24px;

    width: 100%;
    max-width: 900px;
    min-height: 210px;

    padding: 24px;
    margin: 20px auto;

    background: white;
    border: 1px solid #e5e9f0;
    border-radius: 18px;

    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s ease;
}

.css-item-container:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
}

/* Product image */
.product-image {
    width: 145px;
    height: 145px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 12px;
    background: #f8f9fb;
}

/* Product information */


.product-info {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 11px;
    flex: 1;
    min-width: 0;
    font-size: 17px;
}

.product-name {
    font-size: 21px;
    font-weight: 700;
    color: #172337;
}

.product-price {
    position: static;
    font-size: 22px;
    font-weight: 700;
    color: #087b55;
}

.product-weight,
.product-quantity {
    position: static;
    font-size: 16px;
    color: #687386;
}

/* Quantity input */
.input-quantity,
[class*="js-input-quantity-"] {
    width: 75px;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
}

/* Buttons */
.buttons-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.buttons-container span {
    cursor: pointer;
    text-align: center;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.js-update-quantity-span-1,
[class*="js-update-quantity-span-"] {
    background: #e8f0ff;
    color: #2458bd;
}

.css-delete-button {
    background: #fff0f0;
    color: #d63838;
}

/* Old delete image, if used */
.delete-image {
    width: 20px;
    height: 20px;
}

/* Cart list */
.item-list-container {
    width: 100%;
}

/* Checkout section */
.fixed-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 14px;
    background: white;
    box-shadow: 0 -3px 15px rgba(0,0,0,0.08);
    z-index: 1000;
}

.checkout-button {
    display: block;
    width: 100%;
    max-width: 500px;
    margin: auto;
    padding: 16px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    background: #1769e0;
    color: white;
    cursor: pointer;
}

.beInvis {
    display: none;
}


/* Product page mobile layout */

@media (max-width: 600px) {

    body {
        padding: 10px;
        padding-bottom: 190px;
    }

    /* Product list */
    .item-list-container {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    /* Product cards */
    .css-item-container {
        width: 100%;
        min-height: 145px;
        padding: 13px;
        gap: 12px;
        margin: 0;
        border-radius: 14px;
    }

    .product-image {
        width: 90px;
        height: 90px;
    }

    .product-info {
        gap: 8px;
        font-size: 15px;
    }

    .product-name {
        font-size: 17px;
        line-height: 1.3;
    }

    .product-price {
        font-size: 19px;
    }

    .product-weight,
    .product-quantity {
        font-size: 14px;
    }

    /* Quantity input */
    .input-quantity,
    [class*="js-input-quantity-"] {
        width: 85px;
        min-height: 48px;
        font-size: 17px;
    }

    /* Product buttons */
    .buttons-container {
        gap: 9px;
    }

    .buttons-container span {
        min-height: 48px;
        min-width: 76px;
        padding: 12px;
        font-size: 14px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Bottom cart panel */
    .fixed-container {
        padding: 15px;
        padding-bottom: max(15px, env(safe-area-inset-bottom));
    }

    .cart-summary {
        display: flex;
        flex-direction: column;
        gap: 9px;
        margin-bottom: 14px;
        font-size: 17px;
        font-weight: 600;
    }

    #totalPrice {
        font-size: 19px;
        font-weight: 700;
    }

    .checkout-button {
        min-height: 56px;
        font-size: 19px;
        border-radius: 13px;
    }

    /* Confirmation popup */
    .checkout-popup {
        width: 90%;
        padding: 24px 18px;
    }

    .checkout-popup h2 {
        font-size: 22px;
    }

    .checkout-popup p {
        font-size: 16px;
        line-height: 1.5;
    }

    .popup-buttons {
        gap: 10px;
    }

    .popup-buttons button {
        min-height: 52px;
        padding: 13px 10px;
        font-size: 15px;
    }
}
.item-list-container {
    padding-bottom: 15px;
}


/* Checkout popup overlay - hidden initially */
.checkout-overlay {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9999;

    justify-content: center;
    align-items: center;
    padding: 16px;
}

/* Popup box */
.checkout-popup {
    width: 100%;
    max-width: 380px;
    background: white;
    padding: 28px 20px;
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
}

.checkout-popup h2 {
    font-size: 23px;
    margin: 0 0 14px;
    color: #222;
}

.checkout-popup p {
    font-size: 16px;
    line-height: 1.5;
    color: #555;
    margin-bottom: 24px;
}

/* Popup buttons */
.popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popup-buttons button {
    width: 100%;
    min-height: 52px;
    border: none;
    border-radius: 11px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
}

#backToCart {
    background: #e5e7eb;
    color: #222;
}

#confirmCheckout {
    background:  #e5e7eb;
    color: rgb(18, 56, 221);
}

#confirmCheckout:active,
#backToCart:active {
    transform: scale(0.98);
}
