/* ===== КОРЗИНА ===== */
.cart-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 3000;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 20px;
}

.cart-modal-overlay.active {
    display: flex;
}

.cart-modal-sheet {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: cartSlideIn 0.3s ease;
}

@keyframes cartSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.cart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.cart-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.cart-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.cart-modal-close:hover {
    color: #fc3f1d;
}

.cart-modal-body {
    padding: 16px 24px;
    overflow-y: auto;
    flex: 1;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.cart-item-oem {
    font-size: 12px;
    color: #999;
    margin-bottom: 2px;
}

.cart-item-seller {
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 800;
    color: #fc3f1d;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.cart-qty {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f5f5f5;
    border-radius: 6px;
    padding: 2px;
}

.cart-qty button {
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
}

.cart-qty button:hover {
    background: #e5e5e5;
}

.cart-qty span {
    min-width: 20px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #fc3f1d;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}

.cart-item-remove:hover {
    text-decoration: underline;
}

/* Счётчик на иконке корзины */
.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #fc3f1d;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    display: none;
}

/* Тост (уведомление) */
.cart-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a1a1a;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    z-index: 4000;
    transition: transform 0.3s;
}

.cart-toast.active {
    transform: translateX(-50%) translateY(0);
}
