/* Scoped styles for the item component */
.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    /* Img - Info - Controls */
    gap: 1.5rem;
    background: var(--color-bg-card);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    margin-bottom: 1rem;
    align-items: center;
    transition: all 0.3s ease;
}

.cart-item:hover {
    border-color: rgba(40, 137, 216, 0.5);
    /* Blue glow on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Image */
.item-thumb-wrapper {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.item-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info */
.item-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text-main);
    margin-bottom: 0.25rem;
    display: block;
}

.item-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.item-price {
    color: var(--color-accent-amber);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Controls */
.item-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.qty-control {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    border: 1px solid var(--color-border);
    padding: 4px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--color-text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.qty-input {
    width: 40px;
    background: transparent;
    border: none;
    text-align: center;
    color: var(--color-text-main);
    font-weight: 600;
    appearance: none;
    -moz-appearance: textfield;
}

.action-remove {
    color: var(--color-text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.action-remove:hover {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
}

@media (max-width: 600px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
        gap: 1rem;
    }

    .item-thumb-wrapper {
        width: 80px;
        height: 80px;
    }

    .item-actions {
        grid-column: 1 / -1;
        justify-content: space-between;
        border-top: 1px solid var(--color-border);
        padding-top: 1rem;
        width: 100%;
    }
}