﻿.cart-item {
    position: relative;
    background: #fff;
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 1.75rem;
    padding: 1.1rem 1.3rem;
    box-shadow: 0 15px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    content-visibility: auto;
    contain-intrinsic-size: 200px;
}

.cart-item:hover:not(.is-updating) {
    transform: translateY(-2px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

.cart-item-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.cart-item-main {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    align-items: flex-start;
    width: 100%;
}

.cart-item-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
    direction: ltr;
}

.cart-actions-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
    width: auto;
}

.cart-item-qty {
    display: flex;
    width: 100%;
    justify-content: flex-start;
}

.cart-qty-group {
    min-width: 160px;
    gap: 0.35rem;
    background: #f6f2ff;
    padding: 0.2rem 0.25rem;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    justify-content: center;
}

    .cart-qty-group button {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: none;
        background: transparent;
        color: #4b3068;
        font-size: 1.35rem;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: color 0.15s ease, background 0.15s ease;
    }

        .cart-qty-group button:hover {
            color: #391b60;
            background: rgba(37, 99, 235, 0.08);
        }

        .cart-qty-group button:focus-visible {
            outline: none;
            box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
        }

    .cart-qty-group input {
        min-width: 46px;
        border: none;
        background: transparent;
        font-size: 1rem;
        font-weight: 700;
        text-align: center;
        color: #1d162e;
    }

        .cart-qty-group input::-webkit-inner-spin-button,
        .cart-qty-group input::-webkit-outer-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

.cart-price-amount {
    margin-left: auto;
    font-size: 1.15rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-align: right;
}

.cart-toast {
    position: fixed;
    left: 1.1rem;
    bottom: 1.1rem;
    background: #1f1b2c;
    color: #fff;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.35);
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    font-size: 0.95rem;
    z-index: 70;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

    .cart-toast .material-icon {
        font-size: 1.15rem;
        margin-inline-end: 0.25rem;
    }

    .cart-toast.is-visible {
        opacity: 1;
        transform: translateY(0);
    }

@media (min-width: 640px) {
    .cart-item {
        gap: 1.1rem;
    }

    .cart-item-main {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1.4rem;
    }

    .cart-item-controls {
        width: auto;
        min-width: 250px;
    }
}
