.cart-page {
    max-width: 900px;
    margin: 80px auto;        /* adds nice breathing room */
    padding: 0 20px;
    position: relative;
    z-index: 10;              /* ensure it sits ABOVE the blurred background */
}

.cart-title {
    font-size: 32px;
    padding-top: 20px;
    margin-bottom: 20px;
}

.cart-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    margin-top: 30px;
}

.cart-items {
    flex: 1;
    max-width: 600px;         /* item list column */
}

.cart-summary {
    background: rgba(20, 20, 20, 0.85);
    padding: 20px;
    border-radius: 10px;
    color: #fff;
    width: 260px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    backdrop-filter: blur(3px);
}


.cart-item {
    background: rgba(0,0,0,0.85);
    padding: 18px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}


.cart-item-img {
    width: 85px;
    height: auto;
    border-radius: 4px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-size: 18px;
    margin: 0 0 4px;
}

.cart-item-price {
    font-size: 16px;
    margin-bottom: 8px;
}
.cart-item-stock {
    margin-top: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

.stock-ok {
    color: #848f98;                
    background: rgba(0, 136, 255, 0.12);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #848f98;
}

.stock-low {
    display: inline-block;
    font-size: 0.85rem;
    color: #ffdd77;
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(255, 200, 0, 0.1);
    border: 1px solid rgba(255, 200, 0, 0.25);
    margin-top: 4px;
    white-space: nowrap;  /* <- keeps it all on one line */
}

.stock-none {
    color: #ff6666;
    background: rgba(255, 0, 0, 0.15);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #cc0000;
}
.cart-warning {
    margin-top: 6px;
}

.warn-low {
    display: inline-block;
    color: #ffd966;
    background: rgba(255, 223, 0, 0.15);
    border: 1px solid #e0b300;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 10px;
}

.qty-controls {
    height: 30px;
}

.qty-btn {
    width: 28px;
}

.qty-input {
    width: 38px;
}

.qty-input {
    width: 40px;
    text-align: center;
    border: none;
    background: #fff;
}

.remove-btn {
    background: none;
    border: none;
    color: #cc0000;
    font-size: 14px;
    cursor: pointer;
}

.cart-item-total {
    min-width: 80px;
    text-align: right;
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
    padding-top: 4px;
}

.subtotal-label {
    font-size: 18px;
    margin-bottom: 20px;
}

.checkout-btn {
    display: inline-block;
    width: 88%;
    text-align: center;
    background: #ffcc00;
    color: #000;
    padding: 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
}

.continue-btn {
    margin-top: 20px;
    width: 88%; /* or 100% if you want full width */
}

.checkout-btn:hover {
    background: #e6b800;
}

.cart-panel {
    background: rgba(110, 110, 110, 0.90);  /* soft gray with 90% opacity */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
    max-width: 650px;
    margin: 24px auto;
    backdrop-filter: blur(4px);
}
body.dark::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: -1;
}

body.dark .cart-page {
    background: rgba(110,110,110,0.85);
    border-radius: 12px;
}
.shipping-label {
    font-size: 16px;
    margin: 10px 0 5px;
    color: #ddd;
}

.shipping-amount {
    font-weight: bold;
    color: #fff;
}

.free-ship-msg {
    margin-top: 8px;
    font-size: 14px;
    color: #88ff88;
    min-height: 18px; /* prevents layout shifting */
}

@media (max-width: 768px) {
    .cart-content {
        flex-direction: column;
    }

    .cart-summary {
        width: 100%;
    }

    .cart-item {
        flex-direction: column;
    }

    .cart-item-total {
        text-align: left;
    }
}
